C#

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Wednesday, 30 July 2014

Stars upper half program

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

namespace OverloadingConstructor
{


    class Program
    {
        static void Main(string[] args)
        {
            int num = 8;
            int x;

            for (int i = 0, c = num; i <= num; i++, c--)
            {
                x = c;
                for (int j = 1; j <= i; j++)
                {
                    while (x >= 1)
                    {
                        Console.Write(" ");
                        x--;
                    }
                    Console.Write("* ");

                }
                Console.WriteLine();
            }

            Console.ReadLine();
        }
    }

}






No comments:

Post a Comment