If Else If Java

If Else If Java

If Else If Java


if else if java,conditional operator in java,if statement with multiple conditions,conditional statements in java,nested if statements java


If else if with input

import java.io.*;
class arun
{
public Static void main(String args[]) throwss IOException
{
DataInputStream in = new DataInputStream(System.in);
{
int a,b,c;
System.out.println("Enter the value of a,b,c is:");
a=Integer.parseInt(in.readLine());
b=Integer.parseInt(in.readLine());
c=Integer.parseInt(in.readLine());
if((a>b)&&(a>c))
System.out.println("a is greater");
else
if((b>a)&&(b>c))
System.out.println("b is greater");
else
System.out.println("c is greater");
}
}
}

Post a Comment

0 Comments