Bell 32V development
[unix-history] / usr / lib / learn / C / L2.1b
#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