+ 1

Why is my code not working in java?

I want to print the input if it is less than 7. import java.util.Scanner; public class myclass{ public static void main(String[] args){ Scanner dumb = new Scanner(System.in); int x = dumb.nextInt(); if (x<6){ System.out.println(input); } } }

22nd Jun 2018, 5:55 AM
abhishek mohite
abhishek mohite - avatar
2 Respuestas
+ 5
Hello, abhishek mohite ! In which particular programming language, do you want to do this? Please write, and other people can help you.
22nd Jun 2018, 6:05 AM
Alexander Sokolov
Alexander Sokolov - avatar
+ 1
if(input<7) System.out.println(input);
22nd Jun 2018, 6:22 AM
BlazingMagpie
BlazingMagpie - avatar