0
how I fill outputprintin thig
6 odpowiedzi
+ 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 !!!
0
can you explain a little more? i dont understand your question
0
on the basics accition. I cant make it
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? :)
0
No, Im sorry I need put 6 in but I cant
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.