Preview

Programming Homework

Good Essays
Open Document
Open Document
366 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Programming Homework
Write a program that would calculate and display the results for the multiplication table for values ranging from 1 to 100.

Part 1: Provide your analysis for the following problem statement: You need to write a program that would calculate the results for the multiplication table up from 1 to 100. (For example, 1X1, 1X2, 1X3 … 1X10, 2X1, 2X2 …. 10X2 … 10x10). Your program should print the output for each step and output a new line after 10 items.

What is the required output?

The output required from this program will be a multiplication table going from 1 x 1 all the way to 10 x 10 with a new line after every 10 products.

What is the necessary input and how you will obtain the required output from the given input?

This program should run without any input from the user after executed.

Also, include your variable names and definitions. Be sure to describe any necessary formulas and sample calculations.

The variables in this program will be declared are num_1, num_2 and will be used as integers.

The formula that will be used in this program is num_1 * num_2 adding 1 each repetition using num_2 = num_2 +1

One of the overlooked features of this program is the “Write” statement that makes the proceeding count occur on the next line not in one long string. This is important to differentiate between sets of multiplication tables.

Part 2:

Provide your program design for the program you analyzed for printing the multiplication table. Be sure to describe the fundamental tasks (i.e., things your program must do) needed to solve the problem so you can use a modular design. Provide pseudocode of your overall design that includes the Main module and the order of the module calls, and a Hierarchy chart for the program (see figure 3.8 page 148). Finally, display the flow charts (using Raptor, or your favorite graphics editor) for each module. (See figure 5.3 page 225 as an example.)

FUNDAMENTAL TASKS:

The program

You May Also Find These Documents Helpful