I have two error messages in the code below that I have no idea what they mean. Knot knowing what they mean means that I am unable to fix them.
The errors are
error: switch quantity not an integer
error case label does not reduce to an integer constant#include
int main(int argc, char *argv)
float inputamount, result;
Enter amount to be converted");
in the form SA, where the");
where the two letters represent");
ad = Australian dollars.");
gb = British Pounds.");
jp = Japenes yen.");
vd= Vitnames dollars.");
Enter amount to convert: ");
result = inputamount * 1.044;
result = inputamount / 0.63;
result = inputamount * 95.057;
result = inputamount * 2.106;
First you should check the syntax of switch:
case : body;break
//and similar all
In above syntax condition is the variable that supply the constant we use to identify which block of code to be run.
In your code you used inputamount as condition which is a float variable and your constants are string. Use a string variable to enter the currency code you want to use to check and than use that variable as a condition.
Hope it will help you!!!