CMIS Homework Assignment 3
Ronald W. Thompson
CMIS 102 / 6380
Dr. Hung Dao
June 17, 2012
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 – Here are the input data, output data and processing step to convert input data to output data.
1. Input Data:
a. 2 integer variables: RowNumB, ColumnNumbB.
b. ONE character variable for the user’s option (*).
2. Output Data: An Integer total for the result of the operation.
3. Processing: The output RESULT can be obtained from the input data by using the following formula:
Result = RowNumbB * ColumnNumB+
B. Program Design –
This program will consist of the following modules:
· Main Module
· Perform Calculations Module
Main Module
//Welcome to our Multiplication display program
// This program will display and multiply numbers from 1 to 100 and will display
// them in rows and columns.
Write “Welcome to our display Calculator.”
Write “new line.”
Write “This program will display the multiplication chart of numbers from 1 to 100.”
Call Calculation Module
End Program
Input Data Module
Write “Please enter the RowNumB: ”
Input Number
Write “Please enter the ColumnNumB: ”
Input Number
End Program
Calculation_Module
Declare ROWNUMB, COLUMNNUMB as Integers
//For each iteration of ROWNUMB
For (ROWNUMB=1; ROWNUMB<=10; ROWNUMB++)
//For each iteration of COLUMNNUMB
For (COLUMNNUMB=1; COLUMNNUMB<=10; COLUMNNUMB++)
//Display the calculation
Write ROWNUMB*COLUMNNUMB+ “ “
End For
//Display a new line
Write “ ” + new line”
//end our for
End For
//program ends here at the end Calculation_module
End of Program
C. Program Comments and Test Data
Input:ROWNUMB*COLUMNNUMB
(RowNumB = > 10)
(RowColumnB = >10) / Expected output:
RowNumB * RowColumnB / 1 2 3 4 5 6 7 8 9 10
2 4 6 8 10 12 14 16 18 20
3 6 9 12 15 18 21 24 27 30
4 8 12 16 20 24 28 32 36 40
5 10 15 20 25 30 35 40 45 50
6 12 18 24 30 36 42 48 54 60
7 14 21 28 35 42 49 56 63 70
8 16 24 32 40 48 56 64 72 80
9 18 27 36 45 54 63 72 81 90
10 20 30 40 50 60 70 80 90 100
Raptor Flowchart
Main_Module
Calculation_Module
MASTER CONSOLE Documentation & Test Data
6