Answer to Question #277435 in C# for evin

Question #277435

 make five randomly inputted characters fall in line using code


1
Expert's answer
2021-12-08T16:29:37-0500
using System;
using System.Collections.Generic;


namespace App
{
    class Program
    {
        public static void Main()
        {
            char[] characters = new char[5];
            for (int i = 0; i < 5; i++)
            {
                characters[i] = Console.ReadLine()[0];
            }


            for (int i = 0; i < 5; i++)
            {
                Console.Write(characters[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