Searching...
27 Des 2013

C# Program to print Rectangle $

17.58
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("$ $\n");

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


0 komentar:

Posting Komentar