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 <stdio.h>
int main(int argc, char *argv[])
{
float inputamount, result;
printf("\n\n Enter amount to be converted");
printf("\n in the form SA, where the");
printf("\n where the two letters represent");
printf("\n a country.");
printf("\n ad = Australian dollars.");
printf("\n gb = British Pounds.");
printf("\n jp = Japenes yen.");
printf("\n vd= Vitnames dollars.");
printf("\n\n Enter amount to convert: ");
switch(inputamount)
{
case "ad":
result = inputamount * 1.044;
break;
case "gb":
result = inputamount / 0.63;
break;
case "jp":
result = inputamount * 95.057;
case "vd":
result = inputamount * 2.106;
break;
default:
The errors are
error: switch quantity not an integer
error case label does not reduce to an integer constant
#include <stdio.h>
int main(int argc, char *argv[])
{
float inputamount, result;
printf("\n\n Enter amount to be converted");
printf("\n in the form SA, where the");
printf("\n where the two letters represent");
printf("\n a country.");
printf("\n ad = Australian dollars.");
printf("\n gb = British Pounds.");
printf("\n jp = Japenes yen.");
printf("\n vd= Vitnames dollars.");
printf("\n\n Enter amount to convert: ");
switch(inputamount)
{
case "ad":
result = inputamount * 1.044;
break;
case "gb":
result = inputamount / 0.63;
break;
case "jp":
result = inputamount * 95.057;
case "vd":
result = inputamount * 2.106;
break;
default: