Addition of any condition to the code


Sir /Ma’am can you tell what to add the condition in this code so that its get the correct output ?
image below is the question
This is Q:19 of Practise Pattern questions pdf

@saarimkhan515
please share your code after saving it on ide.codingblocks.com

here is the link however it was running on eclipse but not on coding blocks IDE

@saarimkhan515
here is your corrected code

please mark your doubt as resolved and rate as well :slight_smile: