Getting run time error here


Getting run time error on coding blocks, while code working correctly on my pc (sublime text). What’s wrong?

Hello @J19APPPP0007,

Have you ever wondered, why do we write return 0 as a last statement of main()?
why don’t you return any other integer?
Have you tried it before?
if you have, then you know the reason for the runtime error.

When you return 0 or return EXIT_SUCCESS, you tell the caller of the program (OS i.e. Operating System) that the status of your program was successful and it could do what it was supposed to do.
Returning some other values may indicate an error.

This is the problem in your code.
You are returning 1, which is causing runtime error.

Hope, this would help.
Give a like, if you are satisfied.