using System;
public class exam
{
public static void Main()
{
int x,y,z;
Console.WriteLine("\n");
Console.Write("Enter the 1st Value : ");
x=int.Parse(Console.ReadLine());
Console.WriteLine("\n");
Console.Write("Enter the 2nd Value : ");
y=int.Parse(Console.ReadLine());
Console.WriteLine("\n");
Console.Write("Enter the 3rd Value : ");
z=int.Parse(Console.ReadLine());
if((x>=y)&&(x>=z))
{ Console.WriteLine("\nx is greater value"); }
else if(y>=z)
{ Console.WriteLine("\ny is greater value"); }
else
{ Console.WriteLine("\nz is greater value"); }
}
}C#
Branching Statement : else if ladder

Written by
View ProfileSenthilvelan Sambamoorthy
Senthilvelan Sambamoorthy is working as a Professor in Department of Master of Computer Applications, Paavai Engineering College, Namakkal, Tamilnadu, India, He is Masters in Computers Applications. Having 18+ years of experience and his area of interest is Java, JSP, Servlet, J2EE, C#, PHP, Python ASP.NET, SQL Server and etc.
