WAP to find largest among three numbers.
2 years ago
OOP Java
Compile code:
class Largestnumberofthreenumbers{
public static void main(String[] args) {
int a = 5, b = 15,c=30;
if(a>b&&a>c)
System.out.println("Largest numbers is: "+a);
else if(b>a&&b>c)
System.out.println("Largest numbers is: "+b);
else
System.out.println("Largest numbers is: "+c);
}
}
Output:
Dipti KC
Jan 8, 2023