Saturday, 27 April 2013

jhon wants to enter player name (range int 1 to 4)

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

namespace ConsoleApplication20
{
    class Program
    {
        static void Main(string[] args)
        {
            int a,i;
            Console.WriteLine("enter the number of players");
            a=Convert.ToInt32(Console.ReadLine());

            string[] arr= new string [a];
            for(i=0;i<a;i++)
            {
                arr[i]=Console.ReadLine();
            }
            for (i = 0; i < a; i++)
            {
                Console.WriteLine("name of player:" + arr[i]);
            }
            Console.ReadLine();
        }
    }
}

No comments:

Post a Comment