0
Please anyone can help me ?How can I add space between one output in java?
Please anyone can help me ? How can I add space between one output in java?
4 Answers
+ 2
for(int i=1;i<=5;i++){
System.out.print(i+" ");
}
0
System.out.println("hi" + " "+"hello"); will have space inbetween
0
Thanks you
- 1
My input: There are multiple groups of input. Each group has a number not more than 5 digits
My output:
For each input number, output according to three lines:
Number of digits in the first row
Separate each digit with a space on the second line, note that there is no space after the last digit
The third line outputs this number in reverse order.
For example, when I input "12345" the Output will be
5
1 2 3 4 5
54321
But my output is
5
12345(How to add space here?)
54321