1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
#include <stdio.h> float countfee(int); int main() { int totalkid,confirm,x; float countfee1,countfee2,package; { printf("How many kids do you want to register? "); scanf("%d",&totalkid); printf("\n"); for (x=1; x<=totalkid;x++) { printf("Please choose your package for kid number %d:",x); scanf("%s",&confirm); switch(confirm) { case '1' : if(package=170.00); break; case '2' : if(package=320.00); break; case '3' : if(package=440.00); break; } } { printf("\n\n** Your total monthly fee: RM%.2f **\n\n",countfee); printf("Thank You.\n\n"); } } float countfee(totalkid); { float fee; countfee1=countfee1+package; countfee=countfee1*0.9; return countfee; } }
12
int totalkid,confirm,x; scanf("%s",&confirm);