Hello Buddy, please help me in the code i am facing one issue please once check.
Ref: https://ide.codingblocks.com/s/279440
Hollow Diamond Pattern
@s.v,
Hi, https://ide.codingblocks.com/s/279472 corrected code.
Errors:
- Start noOfSpaces from 0 not 1.
- Also I added the following code snippet because we were getting an extra star and to handle the extra star we add this :
int checkStars1 = 0;
if (row == 1 || row == n) //added
checkStars1 = 1; //added
1 Like