Write a program that will print out a 9x9 multiplication table, that looks exactly like the one below. Take careful note of the spacing.
* 1 2 3 4 5 6 7 8 9 1 1 2 3 4 5 6 7 8 9 2 2 4 6 8 10 12 14 16 18 3 3 6 9 12 15 18 21 24 27 4 4 8 12 16 20 24 28 32 36 5 5 10 15 20 25 30 35 40 45 6 6 12 18 24 30 36 42 48 54 7 7 14 21 28 35 42 49 56 63 8 8 16 24 32 40 48 56 64 72 9 9 18 27 36 45 54 63 72 81
Your program should actually compute the values to put into the table. No fair simply writing a program that contains the ten lines of text from above already formatted as character strings!
Homework Problem 10
Write a program that plots a graph of N cycles of the function
, where N > 0 is an input to the program and is not
necessarily an integer. The x axis should be vertical on the screen and be
40 lines long. The peak to peak size of the graph should be 40 character
positions. Points on the graph should be asterisks on the plot, and
the x--axis should be vertical bars.
You must generate an array that holds the value of the sin function for each of the points that is to be plotted, then use formatted I/O to print the spaces, dashes, and asterisks.
Call your program solution10.f. To submit it for grading, use the UNIX Shell window to connect to the directory that contains your program and enter the following command
hand-in cs101 problem-10 solution10.f
Hamlet Project