Created
January 21, 2017 06:06
-
-
Save cwake/3df4a2fd04d99c62c20f7ab2a8773634 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class p739 | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Enter 3 numbers between 1 and 30"); | |
string[] tokens = Console.ReadLine().Split(); | |
int a = int.Parse(tokens[0]); | |
int b = int.Parse(tokens[1]); | |
int c = int.Parse(tokens[2]); | |
displayAsterisk(a); | |
displayAsterisk(b); | |
displayAsterisk(c); | |
Console.ReadLine(); | |
} | |
static void displayAsterisk(int number) | |
{ | |
for (int i = 0; i < number; i++) | |
{ | |
Console.Write("*"); | |
} | |
Console.WriteLine(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment