So my code is here: http://cpp.sh/7pfnv
Just ignore the rest and look at my S/Square shape.
Variable 'a' refers to the number of shapes and variable 'b' refers to the number of times I need to loop variable 'a'.
Like for example a=2 and b=5.
The shapes must show 2 + 2 + 2 + 2 + 2 = 10.
The answer of the multiplication must not be over 10 :)
I think my codes are a little messed up. :(
Anyone can kindly help me solve how to loop the "+" signs and also the square shapes? Thank you very much. :)
Wrap the a loop inside a b loop. (That's two loops, on inside another -- also called "nested loops".)
The trick, of course, is those plus signs and spaces. For that you'll have to pay attention to whether or not you are on the last loop of b. (Hint, on the last loop, print a '=' instead of a '+'.)