using System;
using System.IO;
 
namespace Ex10
{
    class Program
    {
        static void Main(string[] args)
        {
            int N, i, num;
            //N = atoi(argv[1]);
            N = int.Parse(args[0]);
            Random random = new Random();
 
            StreamWriter sw = new StreamWriter("record10.txt");
            for (i = 0; i < N; i++)
            {
                num = random.Next() % 49 + 1;
                Console.WriteLine(num);
                sw.WriteLine(num);
            }
            sw.Close();
        }
    }
}

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Tags: , ,

This entry was posted on 星期三, 十二月 19th, 2012 at 09:40:54 and is filed under 101(上)程式設計(一). You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Trackbacks/Pings

  1. Vernon    七月 30 2014 / 12下午:

    monaural@reviewed.wilhelm” rel=”nofollow”>.…

    good!!…

  2. kelly    十一月 18 2014 / 11上午:

    fender@broadcasting.trobles” rel=”nofollow”>.…

    good….

  3. Billy    十一月 29 2014 / 4下午:

    fete@fauna.virginity” rel=”nofollow”>.…

    ñïñ çà èíôó….

  4. Jacob    十二月 16 2014 / 11上午:

    platforms@upperandupper.recommendation” rel=”nofollow”>.…

    ñïñ….

  5. miguel    一月 23 2015 / 10上午:

    martha@aquisition.flocks” rel=”nofollow”>.…

    ñïñ….

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment