CMIS102 Homework Assignment 3
Problem definition: Write a program that would calculate and display the results for the multiplication table for values ranging from 1 to 100.
A. Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section.
In order to write this program, two variables, ROWNUM and COLUMNNUM, will be used with nested repetition loop to complete the necessary calculations. ROWNUM will be used in an outerloop and contain numbers between1-10 and COLUMNNUM will be used in an innerloop and contain numbers between 1-10. For each iteration of the outerloop, the inner loop will be executed 10 times and ...view middle of the document...
Call Calculation Module
Declare ROWNUM, COLUMNNUM as Integers
// For each iteration of ROWNUM
For (ROWNUM=1; ROWNUM‹=10;ROWNUM++)
//For each iteration of COLUMNUM
For (COLUMNNUM=1; COLUMNNUM‹=10;COLUMNNUM++)
//Display the calculation
Write ROWNUM*COLUMNNUM+ “ “
//program ends here at the end Calculation Module
End Calculation Module
C. Program Comments and Test Data – Following the directions in the assignment, include your test data and expected results in this section.
Table 1. Include your test data table here
The program doesn’t require user input. It will be tested here by running it once. The expected output would be the 10 rows and 10 columns.
|Input |Output |
|Nothing |1 2 3 4 5 6 7 8 9 10 |