[user02@FC4 Lesson06]$ cat -n showmath.c
1 #include <stdio.h>
2
3 int main(void)
4 {
5 printf("5 + 7 = %d\n", 5 + 7);
6 printf("12 - 7 = %d\n", 12 - 7);
7 printf("1.2345 * 2 = %f\n", 1.2345 * 2);
8 printf("15 / 3 = %d\n", 15 / 3);
9
10 return 0;
11 }
[user02@FC4 Lesson06]$ gcc -o showmath showmath.c[user02@FC4 Lesson06]$ ./showmath
5 + 7 = 12
12 - 7 = 5
1.2345 * 2 = 2.469000
15 / 3 = 5
lesson_6_showmath.c, Rev. 1, Last changed on 2005-08-09 02:13, 353 page hits