Write a program that prints one random number in
Output a sideways "skyline" with random building heights. Do not print an empty line as part of the skyline. The maximum height building need not be part of the skyline, but no building should be taller.
How many buildings? 7
How tall is the tallest building? 9
Write a program that prints
n random numbers in
The values for
b will come from the user.
a will be less than or equal to
How many random numbers would you like? 4
What range should the numbers be in (space-separated)? -3 3
Your random numbers are:
Allow the user to enter the numbers in the wrong order.
For instance, they could enter
3 -3 and your program would output numbers in
Implement your own pseudo-random number generator.
HINT: Be careful about big numbers. Choose your datatypes accordingly.
Pick a number to mod by. We will be using 6947.
Pick a number to shift by. We will be using 27.
Pick a number to exponentiate by. We will be using 3.
Start with some intial sequence value, called the seed (mod 6947)
The next term in the sequencee is the previous term plus the shift value, raised to the third power (mod 6947)
Enter the seed value: 0
How many random numbers would you like? 5
Use the current time to seed our random number generator.