subject

A simple random generator is obtained by the formula Pnew = (a * rold + b)%m
and then setting rold to Pnew. If m is chosen as 232, then you can compute
new = a * rold + b
because the truncation of an overflowing result to the int type is equivalent to computing the remainder.
Write a program that asks the user to enter a seed value for Pold. (Such a value is often called a seed). Then print the
first 100 random integers generated by this formula, using a = 32310901 and b = 1729.

Must be in Java coding. Please don't include array as there solution with it. I need to know how to do it without array.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. a company wants to use online methods to target more customers. it decides to conduct a market research by collecting the data of a few customers with their consent. they want to track data of the sites that their customers frequently visit. which software can the company? a. spyware b. bots c. adware d. trojan horse e. rootkits
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
Answers: 1
question
Computers and Technology, 24.06.2019 11:30
Why is body language an important factor in a business meeting
Answers: 1
You know the right answer?
A simple random generator is obtained by the formula Pnew = (a * rold + b)%m
and then setting...
Questions
question
Mathematics, 11.02.2021 02:00
question
Mathematics, 11.02.2021 02:00
question
Mathematics, 11.02.2021 02:00
question
Mathematics, 11.02.2021 02:00
Questions on the website: 13722363