Find the greatest number among three
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
int a, b, c;
Console.WriteLine("enter the
first three numbers ");
a = Convert.ToInt32(Console.ReadLine());
b = Convert.ToInt32(Console.ReadLine());
c = Convert.ToInt32(Console.ReadLine());
if (a > b && b > c)
{
Console.WriteLine("a is
greatest no");
}
if (b > c && c > a)
{
Console.WriteLine("b is
greatest no");
}
Console.WriteLine("c is
greatest no");
Console.ReadLine();
}
}
}
https://www.youtube.com/channel/UCKLRUr6U5OFeu7FLOpQ-FSw/videos
0 comments
Post a Comment