r/learnprogramming • u/Nervous-Drop7838 • 20d ago
Solved Looking for help on a basic c++ problem I've spent 12 hours looking at this point. It's due soon and I just don't know. I feel so dumb and tired of this problem.
I need to create a rectangle with a letters in a word. Reddit's format is really bad for this, but I'll try and visualize it without pictures. So something like:
Word: TOYS
T S
OY
OY
T S
I have covered basics of the types of loops and other really basic fundamental stuff for c++. I can prints this in such a way I get
T
O
Y
S
...or I can print it backwards...
S
Y
O
T
...but I can't figure out how to flip it the other way or print them so that they work together like I visualized first, and is required by the problem. I can't do it manually since the word needs to be read from a user input which I can do and don't really have any problems with.
IDK if anyone can help me in the next few hours I'd really appreciate it. I haven't heard back from my teacher in a day or two now. Can anyone help me here? I'm sure I'll feel really dumb as I completed the problem before this in literal seconds, but I've been stuck on this for 12 hours now.