Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
https://i.imgur.com/wXP6Kfg.png[^]

What I have tried:

java always gives me this graphic unstructured
Posted
Updated 20-Oct-22 6:26am
Comments
Richard MacCutchan 20-Oct-22 10:37am    
It is just a matter of printing a number of characters with some (or no) spaces in between. And without seeing your code we have no way of figuring out what you are doing wrong.

1 solution

As Richard has commented, it's just character, spaces, character - so use a loop to print "repetitive" lines.

For example, to print this line:
/      \
You could use this code:
Java
System.out.print("/");
for (int i = 0; i < 6; i++)
   System.out.print(" ");
System.out.println("\\");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900