Sunday 25 August 2013

print vertically program

Q:- Write a program in C# that take string input and print the result vertically???

Ans:- using System;
using System.Collections.Generic;
using System.Text;

namespace codeforevenorodd
{
    class Program
    {
        static void Main(string[] args)
        {

            string name = Console.ReadLine();
            for (int i = 0; i < name.Length; i++)
            {
                Console.WriteLine(name[i]);
            }
            Console.ReadLine();
        }
        }
    }
 

1 comment: