Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+19 votes

I have tried to follow the instructions provided in Practice It, but I still cannot understand how to put the correct spacing in Practice It.

asked in CSC211_Winter2018 by (8 points)
+3

Can you be a bit more specific about what you are trying to accomplish, and what is happening currently?

Also, someone else asked what might be a similar question about spacing/tabs ... does it help you? If not, please describe your question in more detail!

+2

If you're making the code its \t but if you're creating a codes output make sure to add spaces to the end each word to make it so the next word is starting from the 9th slot.

For example: The word Grade is 5 letters long, so you need to add 3 spaces to the end to make it be 8.

3 Answers

+8 votes

insert tab by typing \t or pressing the space bar 8 times

answered by (8 points)
+2

Note: "\t" is different than 8 spaces, because it moves the output cursor forward up to 8 spaces, depending on where the cursor is at right now. For example, in

System.out.println("HI\tTHERE!");

the "\t" will move the cursor forward 6 spaces, to get to the next multiple of 8. Like this:

HI      THERE!

But in

System.out.println("HELLO\tTHERE!");

You only get 3 spaces after HELLO (because the cursor is 5 letters toward column 8).

HELLO   THERE!

In both cases, the "T" in "THERE!" is placed in column 8.

+6 votes

you just have to type in \t

answered by (-492 points)
+6 votes

If you're making the code its \t but if you're creating a codes output make sure to add spaces to the end each word to make it so the next word is starting from the 9th slot.

For example: The word Grade is 5 letters long, so you need to add 3 spaces to the end to make it be 8.

answered by (8 points)
...