CS110 Introduction to Computer Science

Spring 2000

Programming Project #3

Due in class on Tuesday, February 29, 2000.

This project is designed to give you experience with using simple loops as well as generating random numbers.

Write a program that administers a test of single-digit (whole number) multiplication. The program generates three questions. Each question is presented as follows:

Question 1. What is 5 times 8? 40
That is correct.

Question 2. What is 4 times 2? 9
That is not right. Try again.
Question 2. What is 4 times 2? 
...

The text in black is the program's prompt. The text in red is the student's response. The program gives three chances to the student to input a correct answer. After three tries, the correct answer is given, and the computer moves on to the next question. All numbers in the questions are >= 0 and <= 9.

The program should generate different questions for each test (run). It should follow the same interface as shown above.

What to Hand in:

For each Exercise, you will hand in the following:

  1. A printout of your C++ program file.
  2. A printout of your project window (select the project window and choose Print from File menu to get this).
  3. At least two sample runs.

Additionally, write a short paragraph/essay on your experiences in working on this assignment.


Each C++ program should have the following:

// Program Name: <The name of your C++ program file>
// Programmer: <Your name here>
// Address: <your e-mail and Campus Address here>
// Assignment Number: <put project number here, e.g. Project#1, Part A>
// Purpose: <A short problem description>


Back to CS110 Page