Runtime error coming up

Your code is showing error because you are returning 1 at the end of main function instead of the returning 0.
Hope this helps.