Regarding this problem


sir can you please check this program

@sraj39273 please take the input n first and the create the array of size n else it will mess up because n will be having garbage value second type the case no correctly
Coding Blocks IDE
this is the changed code logic is same only input is taken correctly and the cases number condition is written correctly
if the issue still exists let me know and if clear rate my experience

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.