Random numbers
Please, I need code to generate random numbers using the middle square
method, congruence method and the arithmetic congruence method. I want
the codes in console application.Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Feb 21, 2013, 4:27 AM EST
http://www.c-sharpcorner.com/forums/thread/137073/random-numbers.aspx
As for the 'middle-square method', here's an implementation of that using a six digit seed:
using System;
Upamanyu Roy Choudhury146 reputationPosted Feb 20, 2013, 11:19 PM EST
Use Random class to generate random number.
Random integer between 0 and 100 (100 not included):
You may also find the following link as useful
http://www.dotnetperls.com/random
Keep me posted.
Random random = new Random();int randomNumber = random.Next(0, 100);
MessageBox.Show(randomNumber.ToString());
harsha raju2 reputationPosted Jun 27, 2014, 2:49 AM EDT
please provide the code for generating random numbers using mid square method
thanks,...