Answer to Question #233445 in C# for angelo r reyes

Question #233445

Create a C# program that uses array:

that accepts value and display.


1
Expert's answer
2021-09-06T00:17:28-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;


namespace Arrays
{


    class Program
    {
        static void Main(string[] args)
        {
            
            Console.Write("Enter the number elements: ");
            int N = int.Parse(Console.ReadLine());
            string []array=new string[N];
            for (int i = 0; i < N; i++)
            {
                Console.Write("Enter the element[{0}]: ",i);
                array[i]= Console.ReadLine();
            }


            for (int i = 0; i < N; i++)
            {
                Console.WriteLine("The element[{0}] is {1}: ", i, array[i]);
            }




            Console.ReadLine();
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS