Hollow diamond pattern

the output is not coming out to be expected, what should i correct?
https://online.codingblocks.com/player/14352/content/7662/4772?tab=submissions

Plz send your code by saving on ide

Khyati, you have used wrong approach for calculating spaces and stars, refer to this solution


This solution actually calculates the value based on the sign of equality, which will determine the area based on the equality only,