Pages

Kamis, 05 Mei 2016

C Program to print Rectangle

C# Program to print Rectangle $

Program Statement:
Write a program using for loop which prints the following output on the screen.
$$$$$$$$$$$

$                $

$                $

$                $

$$$$$$$$$$$

Solution:
 static void Main(string[] args)
{
for (int i = 1; i <= 11; i++)
Console.Write("$");
Console.WriteLine();
Console.WriteLine();

for (int i = 1; i <= 3; i++)

Console.WriteLine("$ $ ");

for (int i = 1; i <= 11; i++)
Console.Write("$");
Console.ReadLine();
}


Related Posts by Categories

0 komentar:

Posting Komentar