Assignment 3
Write a program called multiply.cpp that generates (calculates each product), and displays the following multiplication table:
1 2 3 4 5 6 7 8 9
1 1
2 2 4
3 3 6 9
4 4 8 12 16
5 5 10 15 20 25
6 6 12 18 24 30 36
7 7 14 21 28 35 48 49
8 8 16 24 32 40 45 56 64
9 9 18 27 36 45 54 63 72 81
You will need to use nested loops in writing this program, or,
alternatively, you can call a function that prints one row at a time
(using a loop) from within the body of a loop that prints the entire
table. This was demonstrated in class with the calprint program.
The program multiply.cpp must be turned in by transferring it
to your ftp directory for this class. Only the source code file
should be turned in and it must be named multiply.cpp.
Write a program called totempole.cpp to perform the task described in problem 5.2. You will need to include both the .h file, dice.h, and the .cpp file, dice.cpp, for the dice class in your project folder in order to write this program. Programs using the dice class are presented in your text and will be discussed in class. You'll also need the files randgen.h and randgen.cpp defining the randgen class (i.e., a class used to generate a random number); this class is used by the dice class. Be sure to include both .h files and both .cpp files in the project where you write the code for problem 5.2. The program totempole.cpp must be turned in by transferring it to your ftp directory for this class. Only the source code file should be turned in and it must be named totempole.cpp.
Note that 10% of your program grade is based on the readability of your program. This includes things like style, comments, and the naming of variables and functions. Make sure you include a comment at the top of each program with your name, course and purpose of the program specified.