using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace greatest
{
Class Program
{
static void main(string[] args)
{
double a, b, c;
Console.WriterLine("Please input three numbers.");
a=Convert.Toint32(Console.ReadLine());
b=Convert.Toint32(Console.ReadLine());
c=Convert.Toint32(Console.ReadLine());
if(a>b && a>c)
{
Console.WriteLine("The greatest number is:{0}",a);
}
else if (b>a && b>c)
{
Console.WriteLine("The greatest number is:{0}",b);
}
else
{
Console.WriteLine("The greatest number is: {0}",c);
}
Console.ReadLine();
}
}
}
OUTPUT:
Please input three numbers.
5
6
7
The greatest number is: 7
Comments
Post a Comment