3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by vinnitro
1

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?

0
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();
        }
    }
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.