/* Game.c (c) Kari Laitinen http://www.naturalprogramming.com/ 2013-11-19 File created. 2013-11-19 Last modification. */ #include int main() { int integer_from_keyboard ; int one_larger_integer ; printf( "\n This program is a computer game. Please, type in " ) ; printf( "\n an integer in the range 1 ... 2147483646 : " ) ; scanf( "%d", &integer_from_keyboard ) ; one_larger_integer = integer_from_keyboard + 1 ; printf( "\n You typed in %d \n My number is %d", integer_from_keyboard, one_larger_integer ) ; printf( "\n Sorry, you lost. I won. The game is over. \n\n" ) ; return 0 ; } /* The return type of a C main() method should be int. The following was said at stackoverflow: You can write return 0; at the end of a main() function, even though C99 permits you to omit any return there (and it then behaves as if you wrote return 0;). */