switch (character)
{
case 'a':
printf("The sum of the number entered is %6.3f\n",fnum+snum);
break;
case 'b':
printf("The product of the numbers entered is %6.3f\n",fnum*snum);
break;
case 'c':
if(snum != 0.0)
printf("The first number divided by the second is %6.3f\n",fnum/
snum);
else
printf("Division by zero is not allowed\n");
break;
}
return 0;
}
are you sure you are reading the values correctly? You won't get the
correct result if you don't retrieve the correct values. Try to print
them out to check them.
Best wishes,
Zeppe
> I am a student learning C language, I know many of you are good at it. I
> need your help.Thank you.
comp.lang.c
--
OU
Remember 18th of June 2008, Democracy died that afternoon.
http://frapedia.se/wiki/Information_in_English
Your First scanf call is taking two numbers