Finding Largest number using C#
Greater between three numbers
using System;
class Greater
{
public static void Main(String[] args)
{
int a=2,b=4,c=5,max;
max=(a>b)?((a>c)?a:c):((b>c)?b:c);
Console.WriteLine("Greater number is:"+max);
Console.ReadLine();
}
}
Output:
No comments:
Post a Comment