jeudi 23 février 2017

Print Hexagonal pattern using asterisk

I am practising to print various types of patterns and I am stuck at Hexagonal Pattern. I am printing it using Asterisk(*).

It should be dynamic. I have almost completed it but stuck at last part. I have divided all parts in chunks and executing all chunks using while loop and if condition.

My code is in the screenshot.Last if condition is not working fine.

Aucun commentaire:

Enregistrer un commentaire