I won't do your homework either but just think what you must tell the computer to do. Printing stars not a problem, just put the printf "*"; inside the loop. But wait, after every 10 you want a new line, so how will you know it's been 10? Well just think, 1 mod 10 = 1, 2 mod 10 =2, etc... 10 mod 10 = 0, Hmm 20 mod 10 =0 too! Hope this helps.
No comments:
Post a Comment