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();
}


0 komentar to “C Program to print Rectangle”

Posting Komentar

 

Make Money Online Now Free Copyright © 2016 -- Powered by Blogger