Code:
case'+': ERG=OPE1+OPE2;
printf("Ergebnis = %.1lf \n", ERG);
break;
case '-':
ERG=OPE1-OPE2;
printf("Ergebnis = %.1lf \n", ERG);
break;
case '/':
ERG=OPE1/OPE2;
if(OPE2==0)
{
printf("Error! Division durch Null ist nicht moeglich!\n");
break;
}
else
printf("Ergebnis = %.1lf \n", ERG);
break;
case 'x':
ERG=OPE1 * OPE2;
printf("Ergebnis = %.1lf \n", ERG);
break;
case '_/':
ERG=pow(OPE1, 1/OPE2);
if(OPE2==0)
{
printf("Error!\n");
break;
}
else if(ERG<0)
{
printf("Error!");
break;
}
else
printf("Ergebnis = %.1lf \n", ERG);
case 'xx':
ERG=pow(OPE1, OPE2);
printf("Ergebnis = %.1lf \n", ERG);
these are my switch cases