write a java program to input 3 no. and find the largest among them....??
Answers
Answered by
1
Example 1: Find Largest Among three numbers using if..else statement ... else System.out.println(n3 + " is the largest number ."); } }.
pragyapathak12:
please write in order
Answered by
3
import Java. io. *;
class g;
{
public static void main(String args[])throws Exceptions
{
DataInputStream in=new DataInputStream(System.in)
int a, b, c;
a=Ip;
b=Ip;
c=Ip;
if(a>b&&a>c)
Sopln(a±" is greater");
if(b>a&&b>c)
Sopln(b±" is greater");
if(c>a&&c>b)
Sopln(c±" is greater");
}
}
class g;
{
public static void main(String args[])throws Exceptions
{
DataInputStream in=new DataInputStream(System.in)
int a, b, c;
a=Ip;
b=Ip;
c=Ip;
if(a>b&&a>c)
Sopln(a±" is greater");
if(b>a&&b>c)
Sopln(b±" is greater");
if(c>a&&c>b)
Sopln(c±" is greater");
}
}
Similar questions