Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

40,003 questions

51,950 answers

573 users

How to generate 3 digits random numbers in C#

1 Answer

0 votes
using System;
using System.Text;

class Program
{
    static void Main()
    {
        Random rand = new Random(); 
  
        for (int i = 1; i <= 50; i++) { 
            Console.WriteLine(rand.Next(100, 1000)); 
        } 
    }
}
 
 
 
/*
 
run:
 
969
324
241
716
247
792
730
477
382
272
264
196
458
462
677
745
360
951
604
807
837
224
512
216
804
215
522
488
629
931
792
723
839
574
198
913
792
823
693
211
768
450
225
963
605
716
658
810
516
988
 
*/

 



answered Jun 18, 2019 by avibootz

Related questions

2 answers 176 views
1 answer 130 views
1 answer 126 views
1 answer 160 views
1 answer 117 views
2 answers 501 views
1 answer 117 views
...