Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- // #2. Write a program that generates and prints to the console 10 random values in the range [100, 200].
- class Program
- {
- static void Main()
- {
- Random rand = new Random();
- Console.WriteLine("The 10 random numbers are: ");
- for (int number = 1; number <= 10; number++)
- {
- int randomNumber = rand.Next(101) + 100;
- Console.WriteLine("{0}", randomNumber);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement