Thursday 22 August 2013

print star(*) vertically in C#

Q:- . Print * 10 times vertically using C# Console Application?????'





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

namespace codeforevenorodd
{
    class Program
    {
        static void Main(string[] args)
        {
          for(int i=0; i<10;  i++)
            {
            Console.WriteLine("*");
           
           
            }
          Console.ReadLine();
        }
        }
    }
 

No comments:

Post a Comment