❔ Unicode Art
Ask the user for an unsigned integer N. Then, create Unicode-Art as an M by M grid, where M = 3*N+2, consisting of spaces and the characters |, -, and +; N is the number of lines/characters between intersections, i.e. + signs.
It should return something like this: (image)
17 Replies
C#
What do you have so far?
I'm rn trying to learn logic behind it
I don't really know where to start
Step 1: Do you know how to write to the console?
Yes I know
Nice. Do you know how loops work?
yes
That's all what I have
rn
Maybe start with the code to do the
--+--+--
line? Make that work as you vary N
.
Then move onto one of the other lines -- the | |
. Get that workingokay I will try
Then start putting it together -- do the right number of
| |
lines, then a --+--+--
line, etc
But, break the problem down into smaller problems, and solve those individually first@canton7 thanks for help I done that
I will try second one
FWIW, I'd have probably written something like:
Or:
(for the
--+--+--
lines)
But yours looks like a sensible approachWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.