0
What mistake is there please anyone tell ?
import java.util.*; public class Program { public static void main(String[] args){ Scanner sc=new Scanner (System.in); int a=sc.next(); if (a<5){ System.out.println("No.is less than Five"); }else{ System.out.println("No.is greater than Five"); } } }
1 Answer
+ 3
sc.next() reads a word of string. Instead use
int a = sc.nextInt();