CS110 Introduction to Computer Science

Fall 1998

Programming Project #3

Due in class on Thursday, October 22, 1998.

This project is designed to give you an 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).

What to Hand in:

For each Exercise, you will hand in the following:

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

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


Sample Problem Definition Form

Problem: State the problem here.

Inputs: Identify the inputs to the program

Outputs: Specify the output of the program

Algorithm: Show the main steps of the algorithm that solves the problem.


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