Went to the national library with my secondary school friend. I was half an hour late and he was an hour late. So, i used the time to complete my Samurai Sudoku. I finally finished it!! In total i've spent about 6 hrs on it. Maybe i'll try another one, but right now i think i need a break from sudokus. Anyway, my friend seemed to be desprate to get his hands on those newspaper microfilm archives that they had, so we asked around for it and finally ended up at the 11th floor. It was quite high tech, after choosing our microfilm reels and filling up some form, we were led into this room where they had a lot of machines to read the film. As we were first timers, we were taught how to use the thing. It's a must-see for those in Singapore!!!
And here's my first exercise on c-language programming. It's a programme that adds up 3 integers. Initially, i found out that it closes too quickly without giving the person time to see the addition. So, i added in the closing thing. Oh, btw, you'll need a compiler to build the program.
#include
int main()
{
int a, b, c, d, e;
printf("Enter the first value:");
scanf("%d", &a);
printf("Enter the second value:");
scanf("%d", &b);
printf("Enter the third value:");
scanf("%d", &c);
d = a + b + c;
printf("%d + %d + %d= %d\n", a, b, c, d);
printf("okay, to close this thing just put in some integer and press enter");
scanf("%d", &e);
return 0;
}
No comments:
Post a Comment