khuang8493
6/13/2018 - 12:47 AM

Good Coding Practice 1

A good practice of writing code, is to break down the problem into small steps.

A good practice of writing code, is to break down the problem into small steps.

Use the comment lines to first write down each step, like this:

for (int i=0; i<=height; i++)

{

// print spaces for left pyramid

// print hashes

// print gap

// print hashes for right pyramid

// print new line

}

And then fill each part with code.