Need Programming Assignment Help?

Get Help with Programming Assignment in Java, C/C++, Dot Net, PHP, Database and UML Diagrams

Array Input and Output in Csharp Programming

Array Input and Output in Csharp Programming

Array Input and Output in Csharp – In this program it will ask the user to give five numbers. The given number by our user will display at screen using one dimensional array.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace array_input_output
{
class array_input_output
{
static void Main(string[] args)
{
int[] rollno = new int[6];
Console.Write("Array Input and Output in C#");
Console.Write("\n\n");
for (int s = 1; s <=5 ; s++)
{
Console.Write("Enter value in item no. {0} : ", s);
rollno[s] = Convert.ToInt32(Console.ReadLine());
 }
Console.Write("\n\n");
Console.Write("The List of Items Values ");
Console.Write("\n\n");
for (int j = 1; j <= 5; j++)
{
Console.Write(" {0} ", rollno[j]);
}
Console.Write("\n\n");
Console.Write(" End of Program ");
Console.ReadLine();
}
}
}