Commit | Line | Data |
---|---|---|
d6c1f319 C |
1 | |
2 | (Section 1.2) | |
3 | Write a C program that prints a number which is | |
4 | the sum of three numbers: 23, 197, and the product | |
5 | of 23 and 197. Again, compile and test | |
6 | it. Please do the computation with the program - | |
7 | if you do it by hand, I'll give you credit for the | |
8 | work, but it's just stupid. | |
9 | #user | |
10 | a.out >test | |
11 | grep 4751 test >/dev/null | |
12 | #succeed | |
13 | /* Here is one possible solution */ | |
14 | ||
15 | main() | |
16 | { | |
17 | printf("%d\n", 23 + 197 + 23*197); | |
18 | } | |
19 | #log | |
20 | #next | |
21 | 2.1c 10 |