You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
636 B
C#
29 lines
636 B
C#
/*
|
|
* C# Program to Find Greatest among 2 numbers
|
|
*/
|
|
using System;
|
|
class prog
|
|
{
|
|
public static void Main()
|
|
{
|
|
int a, b;
|
|
Console.WriteLine("Enter the Two Numbers : ");
|
|
a = Convert.ToInt32(Console.ReadLine());
|
|
b = Convert.ToInt32(Console.ReadLine());
|
|
if (a > b)
|
|
{
|
|
Console.WriteLine("{0} is the Greatest Number", a);
|
|
}
|
|
else
|
|
{
|
|
Console.WriteLine("{0} is the Greatest Number ", b);
|
|
}
|
|
Console.ReadLine();
|
|
}
|
|
}
|
|
|
|
/*
|
|
Enter the Two Numbers :
|
|
24
|
|
34
|
|
34 is the Greatest Number |