0
Java program to check maximum no between thtee numbers
import java. util. Scanner; class GreaterThree { public static void main(String args[ ]) { int x, y, z; System. out. println("Enter three numbers :") ; Scanner obj=new Scanner (System.in) ; x=obj.nextInt( ) ; y=obj.nextInt( ) ; z=obj.nextInt( ) ; if(x>y && x>z) System.out.println(" x is greater") ; else if(y>x && y>z) System.out.println(" y is greater") ; else if(z>x && z>y) System.out.println(" z is greater") ; else System.out.println(" Entered no are not distinct") ; } }
2 odpowiedzi
+ 6
Some syntax errors here :
import java.util.Scanner; //U in small
class //C in small
System.out.println() //O & P in small
int x,y,z; //I in small
also, you can show value of greater number
0
❓❓t