I can't see anything wrong with this code but for some reason, scanf for char doesn't work. Any idea?
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("Hello, world!\n");
double income, intrest;
char marital_status;
printf ("How much did you earn this year? ");
scanf ("%lf", &income);
if (income > 100.00)
{
printf ("Please enter M=married or S=Single for marital status: ");
scanf ("%c", &marital_status);
printf ("How much intrest did you earn this year? ");
scanf ("%lf", &intrest);
printf ("your marital status is %c and your income is %.2lf intrest is %.2lf \n",marital_status, income,intrest);
}
return 0;
}