Question

#include<stdio.h>
int main()
{
char ch;
printf("Enter Your State Name : ");
scanf("%c",&ch);

if(ch == 'a')
printf("Shipping Charge : $25");

else if(ch == 'b')
printf("Shipping Charge : $50");
else if(ch == 'c')
printf("Shipping Charge : $65");

else
printf("The state not in purchase");

return 0;
}


Please tell me what wrong

Answers

looks ok.
no compiler errors?

what does it print?

Maybe the if ... else if ... construct needs {}

if () {
} else if () {
...
}

Related Questions