using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int num1, num2, result;
Console.WriteLine("Enter First Number");
num1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter socond Number");
num2 = Convert.ToInt32(Console.ReadLine());
if (num2 == 0)
{
Console.WriteLine("You cannot divide by 0");
}
else
{
result = num1 % num2;
if (result ==0)
Console.WriteLine("Divisidle");
else
Console.WriteLine("Not DIvisible");
}
}
}
}
No comments:
Post a Comment