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 15:00
Based on the current economic situation do you expect the employment demand for graduating engineers to increase or decrease? explain the basis for your answer. with a significant economic recovery, what do you think will happen to future enrollments in graduating engineering programs?
Answers: 1
question
Computers and Technology, 24.06.2019 07:50
Write a defining table and then a program that determines if you can sleep in or not. your program should get all its input from your computer’s clock. on all weekdays (monday through friday) that are not holidays, your program should output “get up! ” on all other days (weekends and holidays), your program should output “sleep in.” the three holidays that your program must check for are january 1 (new year’s day), july 4 (u.s. independence day), and december 25 (christmas). you don’t need to include other holidays in your program because most other holidays do not occur on a fixed day each year.
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
5.a fishing rod is formed from a composite material of 0.5 kg of glass fibers embedded in a matrix of 0.5 kg of epoxy resin. the glass fibers are assumed to be long, continuous and unidirectional. to achieve a greater stiffness it is proposed to use a different composite that is comprised of long continuous carbon fibers that will be embedded in a matrix of 0.5 kg of epoxy resin. if the modulus of elasticity of the carbon fiber composite is 10% greater than the elastic modulus of the glass fiber composite, estimate the mass of carbon fibers that will be used to make the carbon fiber composite. assume the applied tensile stress is parallel to the direction of the long axis of the fibers. the epoxy resin, glass fiber, and carbon fiber have an elastic modulus of 5, 86, and 350 gpa respectively and a density of 1100, 2500, and 1800 respectively.
Answers: 3
question
Computers and Technology, 24.06.2019 18:50
Which style did jack use on the vocabulary words in reports?
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
French, 11.02.2022 14:00
question
Biology, 11.02.2022 14:00
question
Geography, 11.02.2022 14:00
question
Chemistry, 11.02.2022 14:00
Questions on the website: 13722363