0
Why showing error in this program. Error showing in last else condition
Package mysecondapp; Import java. util. Scanner ; Public class mysecondapp { Public static void main (string [] args) { int x, y, z; Scanner in=new Scanner (System. in) ; System. out. println ("enter the number") ; x=in. nextInt() ; y=in. nextInt () ; z=in. nextInt () ; If (x>y&&x>z) System. out. println("first number is large) ; else if (y>x&&y>z) System. out.println ("second number is large) ; else if (z>x&&z>y) System. out. println ("third number is large) ; else System.out.println ("no result ") ;
2 Respostas
+ 5
Is this the actual code?
+ 2
You missed a " in the print parameters
If (x>y&&x>z)
System. out. println("first number is large) ; <---
else if (y>x&&y>z)
System. out.println ("second number is large) ; <---
else if (z>x&&z>y)
System. out. println ("third number is large) ; <---