ATM problem showing runtime error

#include <stdio.h>
int main()
int wi;
float ab;
scanf("%4d%4.2f", &wi, &ab);
printf("%4.2f", (ab-wi-0.5));
printf("%4.2f", ab);

i don’t know why it is showing runtime error. i tested it with the examples, and they are working.

ur main function should be returning an integer .return 0

1 Like

the main function must return an integer at the end. for more info about runtime error refer to this link

u missed this condition (ab-wi-0.50>0) …