what is wrong with this progm?Code:
#include<stdio.h>
int main()
{
char ans;
int month,food,trans,eqp,misc;
float total=0,over=0;
do
{
printf("Enter your monthly allowance:");
scanf("%d",&month);
printf("Cost for food:");
scanf("%d",&food);
printf("Cost for transportation:");
scanf("%d",&trans);
printf("Cost for equipment:");
scanf("%d",&eqp);
printf("Other miscellaneous:");
scanf("%d",&misc);
total=food+trans+eqp+misc;
printf("Total cost is RM%0.2f\n",total);
if(total<month)
printf("Alhamdulillah!");
else
over=total-month;
printf("You exceeded RM%0.2f in your monthly allowance\n",over);
printf("Enter 'y' to continue:");
scanf("%c",&ans);
}while(ans=='y');
printf("Good bye.\n");
system("pause");
return 0;
}