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