Hollow Diamond Pattern

Hello Buddy, please help me in the code i am facing one issue please once check.
Ref: https://ide.codingblocks.com/s/279440

@s.v,
Hi, https://ide.codingblocks.com/s/279472 corrected code.

Errors:

  1. Start noOfSpaces from 0 not 1.
  2. 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