Monday, March 17, 2014

Generating_Random_Value_Ex_1 (Wk-4), Jan 27-31, 2014

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Generate_Random_Value_Ex_1
{
    class Program
    {
        static void Main(string[] args)
        {
            repeat:
            Random rand = new Random();
            int n1 = rand.Next();
            int n2 = rand.Next(1000);
            int n3 = rand.Next(10, 101);
            Console.WriteLine("\nRandom Value: \nn1: {0} n2: {1} n3: {2}", n1, n2, n3);
            Console.ReadLine();
            Console.Clear();
            goto repeat;
        }
    }
}

No comments:

Post a Comment