How It Will Be done ?

Recommended Answers

All 2 Replies

Shouldn't ask for homework..

using System;

namespace ddggd
{
    class MainClass
    {
        public static void Main (string[] args)
        {
            char[] characters = new char[8];

            for (int i=0; (i < 8); i++) {
                Console.WriteLine ("Please enter character: " + i);
                characters [i] = Convert.ToChar (Console.ReadLine ());
            }

            for (int j=0; (j < 8); j++) {
                Console.WriteLine (characters [j]);
            }
        }
    }
}

Something like this?

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

namespace Vin308
{
    class Program
    {
        public static void Main(string[] args)
        {
            char[] letters = new char[8];
            int i;
            Console.WriteLine("Enter 8 characters");
            for (i = 0; i < 8; i++)
                letters[i] = Convert.ToChar(Console.ReadLine());
            for (i = 0; i < 8; i++)
                Console.Write(letters[i] + " ");
            Console.ReadKey();
        }
    }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.