Question: Write a program that generates a random number between 1 and 3 0 . The program should then generate a sum of the sequence from

Write a program that generates a random number between 1 and 30. The program should then generate a sum of the sequence from 1 up to the random number. For example, if randomly generated number was 12, than the program should generate the following sequence.
This program will a sequence of numbers up to: 12
1/12=0.08
2/11=0.18
3/10=0.30
4/9=0.44
5/8=0.62
6/7=0.86
7/6=1.17
8/5=1.60
9/4=2.25
10/3=3.33
11/2=5.50
12/1=12.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!