Thursday 18 October 2012

Script * for c#

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

namespace ConsoleApplication18
{
    class Program
    {
        static void Main(string[] args)
        {
            int baris, kolom;

            for (baris = 0; baris <= 10; baris++)
            {
                for (kolom = 0; kolom <= baris; kolom++)
                {
                    if (kolom % 2 == 1)
                    {
                        Console.ForegroundColor = ConsoleColor.Magenta;
                        Console.Write("*");
                    }
                    else
                    {
                        Console.ForegroundColor = ConsoleColor.White;
                        Console.Write("*");
                    }
                }
                Console.Write("\n");
                Console.ReadLine();
            }
        }
    }
}
==========================================================================
Untuk Download file via 4shared Download disini !!

0 komentar:

Post a Comment

Note: only a member of this blog may post a comment.