Table Of Contents
Previous Section Next Section

Program 74: Gross Error

Why does the following program report a syntax error on line 16. What's wrong with line 16?

  1 /************************************************
  2  * gross -- Print out a table of 1 to 10 gross. *
  3  ************************************************/
  4 // A Gross is a dozen - dozen
  5 #define GROSS (12 ** 2)
  6
  7 #include <iostream>
  8
  9 int main()
 10 {
 11     int i;      // Index into the table
 12
 13     for (i = 1; i <= 10; ++i)
 14     {
 15         std::cout << i << " gross is " <<
 16             (GROSS * i) << '\n';
 17     }
 18
 19     return (0);
 20 }

(Next Hint 275. Answer 79.)

Table Of Contents
Previous Section Next Section