You are on page 1of 2

static void Main(string[] args)

{
ex7
();
while(true);
}
private static void ex1()
{
int n = ReadOne();
int[] nums = ReadIntegers(n);
writeLine(nums);
}
private static int ReadOne()
{
int a;
a = Convert.ToInt32(Console.ReadLine());
return a;
}
//Le um Int apenas

//Le kuantos numeros vai ter


static public int[] ReadIntegers(int n)
{
int i=0;
int [] v = new int [n];
while (i<n)
v[i++] = ReadOne();
return v;
}
//Imprime valores
private static void writeLine(int[] o)
{
foreach (int num in o)
{Console.WriteLine(num.ToString());
}
}
private static void ex7()
{
Console.WriteLine("insert bet numbers");
int[] numkey = ReadIntegers(5);
Console.WriteLine("insert bet numbers");
int[] starkey = ReadIntegers(2);
ShowBet (numkey,starkey);
}
private static void ShowBet(int[] numkey, int[] starkey)
{
int i;
for (i = 1; i < 50; i++)
{
if (numkey.Contains(i + 1))
Console.Write(" X");
else
Console.Write(String.Format("{0,3:0}",i));
if (i % 10 == 0)
Console.Write(Environment.NewLine);
}
Console.Write(Environment.NewLine);
Console.Write(Environment.NewLine);
for (i = 1; i < 10; i++)
{
if (starkey.Contains(i))
Console.Write(" *");
else
Console.Write(String.Format("{0,2:0}", i));
if (i % 3 == 0)
Console.Write(Environment.NewLine);
}
}

You might also like