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 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
question
Computers and Technology, 23.06.2019 01:00
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan.in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan.out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
question
Computers and Technology, 23.06.2019 05:20
Which operating system is a version of linux?
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
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
Chemistry, 12.08.2020 06:01
question
Mathematics, 12.08.2020 06:01
question
Mathematics, 12.08.2020 06:01
Questions on the website: 13722361