lesson 6 inccount c
[[lesson_6_inccount_c]] last edit on
Aug 9, 2005
2:25 AM
by rescued_by_c
[user02@FC4 Lesson06]$ cat -n inccount.c
[user02@FC4 Lesson06]$ ./inccount
count's starting value is 1000
count's ending value is 1001
1 #include <stdio.h>
2
3 int main(void)
4 {
5 int count = 1000;
6
7 printf("count's starting value is %d\n", count);
8 count = count + 1;
9 printf("count's ending value is %d\n", count);
10
11 return 0;
12 }
[user02@FC4 Lesson06]$ gcc -o inccount inccount.c[user02@FC4 Lesson06]$ ./inccount
count's starting value is 1000
count's ending value is 1001