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, 21.06.2019 19:40
Write the quartstogallons java class that declares a named constant to hold the number of quarts in a gallon (4). also declare a variable to represent the number of quarts needed for a painting job, and assign an appropriate value—for example, 18. compute and display the number of gallons and quarts needed for the job. display explanatory text with the values, for example:
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Ais a built in formula in spread spread a is any math process such as addition or subtraction. options are function and operation
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
In excel, what happens to the cell contents when you click and drag a cell into multiple cells?
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Create a file called favorite_foods, and list your favorite foods, entering five or six or more. press enter after each favorite food so it appears on its own line (make certain you also press enter after the final food item). after the file is created, add two more foods you like that are not on the list (press enter after the final food item). view the list of foods to make certain the two items you added appear at the end of the list
Answers: 2
You know the right answer?
A simple random generator is obtained by the formula Pnew = (a * rold + b)%m
and then setting...
Questions
question
Computers and Technology, 26.10.2019 12:43
question
History, 26.10.2019 12:43
question
Mathematics, 26.10.2019 12:43
question
Spanish, 26.10.2019 12:43
question
Social Studies, 26.10.2019 12:43