0

how I fill outputprintin thig

18th Sep 2016, 4:16 PM
Tomi Salo
Tomi Salo - avatar
6 Answers
+ 1
i think u want to know how to input 6 and get the same as an output, if so, i m giving u this code : import java.util.*; public class andy { public static void main (String args[]) { // line to ask for user input System.out.println(" Input ur number :"); int six = new Scanner(System.in).nextInt(); // in the above line you can input six (or any other integer) System.out.println(six); // this line will display the given number (six in your case) } } Try this code out !!! Hope this the solution to your problem !!!
19th Sep 2016, 3:51 PM
Andy
Andy - avatar
0
can you explain a little more? i dont understand your question
18th Sep 2016, 4:22 PM
Aquarius
Aquarius - avatar
0
on the basics accition. I cant make it
18th Sep 2016, 5:30 PM
Tomi Salo
Tomi Salo - avatar
0
ohhh ok. so in your original question, were you saying you didnt get the System.out.println(" "); code. if so then ill explain. System.out.println(" "); is the line of code you use to print the output of whats in the quotes. so if i did System.out.println(" Hello world "); It will print out Hello world in my console. Do you get it? :)
18th Sep 2016, 6:05 PM
Aquarius
Aquarius - avatar
0
No, Im sorry I need put 6 in but I cant
18th Sep 2016, 6:22 PM
Tomi Salo
Tomi Salo - avatar
0
wait quick question for you. What language are you using mate? and do you mean like have it print out the number 6? Cause you can do this: System.out.println("6"); You can actually have the computer multiply, divide, add, and subtract numbers to equal 6. but thats a little bit harder.
18th Sep 2016, 8:18 PM
Aquarius
Aquarius - avatar