public static void remainder()
{
short rem = 51 % 5;
Console.WriteLine(rem);
try
{
short input = System.Convert.ToInt16(Console.ReadLine());
if (input % 2 == 0)
{
Console.WriteLine("Even number");
}
else
{
Console.WriteLine("Odd Number");
}
}
catch (FormatException ex1)
{
Console.WriteLine("Please enter numerals only");
}
}
Thank you! That was useful :)
ReplyDelete