Because in the switch you have to use 1, not '1'
Code:
#include <stdio.h>
#include <math.h>
int main (void) {
int pronum; //this must be an integer, counter
float total;
scanf("%d",&pronum);
switch (pronum) {
case 1:
total = (pronum * 2.98);
break;
case 2:
total =( pronum* 4.50);
break;
case 3:
total = (pronum * 9.98);
break;
case 4:
total = (pronum * 4.49);
break;
case 5:
total = (pronum * 6.87);
break;
}
printf("%f\n%d",total,pronum);
return 0;
}
By using '1' you're testing if the value is the ASCII code of 1, that is 49.