0

van anybody help

i want it to write numbers smaller then your input import java.util.Scanner; public class Program { public static void main(String[] args) { int x = 0; for (int x; x < d; x++) { System.println (x); } Scanner sc = new Scanner(System.in); int d= sc.nextInt(); } }

11th Nov 2016, 10:42 PM
Jakob Ban
Jakob Ban - avatar
3 Respostas
+ 1
Well, code goes from top to bottom. You are first printing things and then asking for user input, while you should probably be doing it the other way around.
11th Nov 2016, 11:08 PM
Schindlabua
Schindlabua - avatar
0
What do you want the program to do?
11th Nov 2016, 11:04 PM
Abdelaziz Abubaker
Abdelaziz Abubaker - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { int x; Scanner sc = new Scanner(System.in); int d= sc.nextInt(); for (x=0; x < d; x++) { System.out.println(x); } } }
12th Nov 2016, 3:11 AM
Aditya kumar pandey
Aditya kumar pandey - avatar