using System.Collections.Generic;
class Program
{
static void Main()
{
Console.WriteLine("www.promohack.blogspot.com");//two print
int a, b,result;//declaring variables
Console.WriteLine("Enter the first number");
a =Convert.ToInt16( Console.ReadLine());//accept value from user
Console.WriteLine("Enter the second number");
b = Convert.ToInt16(Console.ReadLine());
if (b == 0)//condition
{
Console.WriteLine("Your second number should not be zero");
}
else
{
result = a / b;
Console.WriteLine("Your result is "+result);
}
Console.ReadLine();//two hold screen
}
}
Thank you.
Comments
Post a Comment