[user02@FC4 Lesson07]$ cat -n firstcin.c
1 #include <stdio.h>
2
3 int main(void)
4 {
5 int number; // The number read from the keyboard
6
7 printf("Type your favorite number and press Enter: ");
8 scanf("%d", &number);
9 printf("Your favorite number is %d\n", number);
10
11 return 0;
12 }
[user02@FC4 Lesson07]$ gcc -o firstcin firstcin.c[user02@FC4 Lesson07]$ ./firstcin
Type your favorite number and press Enter: 7
Your favorite number is 7
[user02@FC4 Lesson07]$ ./firstcin
Type your favorite number and press Enter: .3
Your favorite number is 134513676
[user02@FC4 Lesson07]$ ./firstcin
Type your favorite number and press Enter: 888888888888888
Your favorite number is 2147483647
[user02@FC4 Lesson07]$ ./firstcin
Type your favorite number and press Enter: -9399999999999
Your favorite number is -2147483648
[user02@FC4 Lesson07]$ ./firstcin
Type your favorite number and press Enter: abc
Your favorite number is 134513676
lesson_7_firstcin.c, Rev. 1, Last changed on 2005-08-10 03:16, 336 page hits