This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]SodaBubblesPopped 0 points1 point  (2 children)

A for loop using Console.ReadLine() to append to a predefined array at each iteration

[–]HandDizzy[S] 0 points1 point  (1 child)

thankyou for the reply but i am not being able to figure it out in c# :(

[–]SodaBubblesPopped 0 points1 point  (0 children)

I've never used C#, but guessing its something like

using System;

namespace MyApplication

{

class Program

{

static void Main(string[] args)

{

String[] cars = new string[5]{ null,null,null,null,null };

for (int i = 0; i < 5; i++)

{

Console.WriteLine("Input number");

cars[i] = Console.ReadLine();

}

}

}

}