This assignment is worth 50 points.
For example, if your program requires 2× 107 instructions and your clock cycle is 570ps (picoseconds), the time required is 2× 107 × 570ps = 1.14 × 1010 ps.
Unfortunately, as humans we really don't understand picoseconds. We are more comfortable with things in larger units. Therefor you should convert the time to several more palatable units. To be specific, the program should output the following:
Your program should prompt the user for the clock speed $c$ in picoseconds and the number of instruction $i$. Each of these values will be an integer but may be fairly large.
Example Run, input is bold
Enter clock speed: 570 Enter the number of instructions: 20000000 11400000000 ps 11400000 ns, 0 ps 11400 us, 0 ns, 0 ps 11 ms, 400 us, 0 ns, 0 ps 0 s, 11 ms, 400 us, 0 ns, 0 ps 0 min, 0 s, 11 ms, 400 us, 0 ns, 0 ps
You should perform all computations as a long to avoid overflow. All data should be stored in an integer type.
All computations can be done with the instructions you know. You do not need if statements or loops to complete this program.
Integer division and modulus are very helpful in this program.
Your identifiers should be constructed properly, with meaningful names.
You should document your code with comments.
Your output should be organized, easy to read, and make appropriate use of white space.
Any numbers with a fixed meaning should be stored as a named constant.
You should only perform any given computation once, store the results. A single source code file.