git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nested Loop Code Help


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

ferzan saglam wrote:
> Hello people, I have written the code below which works fine, but it
> has one small problem. Instead of printing one (x) on the first line,
> it prints two.
> I have tried everything in my knowledge, but cannot fix the problem.
> Thanks for any help in advance.  

either take the initial "stars = x" out, or increment stars after you
print it.  Either approach should give you the result you want.

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEBcqaUD8uEzVNxUrujhHd8xJ5ooEFAl4tr5sACgkQjhHd8xJ5
ooGt+AgArjEk3CIPLvX36SBhZjnjOCdpTXpvzjZDePgMcAJT3WZTweIVmF+JyV6w
xS7kSI/pjmReP/BTH6XGdcJiqsyKeOh5C1D5HgCYFNsuXcegCd1j7PvKlQ/3tVFz
MZUhT46PtWK04Er/Hj4IHUdvP+IRu5HNeUozcWHPlSV9VJmfOd5e94s/cV7Mx5HA
d1p+GHrhS3VDIqY0MBxm3r9A6ciKjys328YpiUpIRfTIX8uUEYWPhNRr3UcIHLBC
ilgZUV5evyr5CXFIET5UKEw4QD0eMLy3T6o2VqR5HsrgAgFW95RTWXNA+qWw+spV
t/grPnMpZ8Cjw5TTbmFYYIrvEyJ+WQ==
=ern6
-----END PGP SIGNATURE-----

-- 
|_|O|_| 
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281