Name: ________________________________ Section: _________________

Honor Code Acknowledgment: ___________________


Random Quiz # 6

CPS 6, Fall 1995

Due: September 20


Problem 1: The Die is Cast (2 points)

The definition:
     Dice cube;

will NOT compile. In one sentence, why?




Problem 2 : Jack Webb's Problem (2 points)

What value is output as a result of executing the following statements:
      int prod = 1;
      int num = 11;
      int k = 1;

      while (k <= num)
      {
          prod = prod * k;
          k += 1;
      }
      cout << prod << endl;