Skip to content

Instantly share code, notes, and snippets.

@cwake
Created January 21, 2017 06:06
Show Gist options
  • Save cwake/3df4a2fd04d99c62c20f7ab2a8773634 to your computer and use it in GitHub Desktop.
Save cwake/3df4a2fd04d99c62c20f7ab2a8773634 to your computer and use it in GitHub Desktop.
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