Computer Science, asked by pragyapathak12, 1 year ago

write a java program to input 3 no. and find the largest among them....??

Answers

Answered by vipbhai
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
pragyapathak12: from beginning to the end
vipbhai: hlo
Answered by nain31
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");
}
}

pragyapathak12: thx
pragyapathak12: but plz try to give answer in scanner class
Similar questions