public static void PrintSmallest(int a, int b)
int smallest = a < b ? a : b;
throw new ArgumentException(String.Format("Arguments must be bigger than 0 (got {0}, {1})", a.ToString(), b.ToString()));
for (int i = 0; i < smallest; i++) {
Console.WriteLine("{0}", smallest);
public static void Main()
Program.PrintSmallest(1,50);
Program.PrintSmallest(10,5);
Program.PrintSmallest(-8, 10);