TOPIC

RUNTIME ERROR

aeduardo14 asked 8 months ago

include

void main(){

int codigo,quantidade; double total;

scanf("%i",&codigo); scanf("%i",&quantidade);

switch(codigo){

case 1:
    total = quantidade * 4.00;
    break;

case 2:
    total = quantidade * 4.50;
    break;

case 3:
    total = quantidade * 5.00;
    break;

case 4:
    total = quantidade * 2.00;
    break;

case 5:
    total = quantidade * 1.50;
    break;

}

printf("Total %.2lf\n",total);

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.