#include #include #include float checkGia(float min, float max){ float num; int check; char c; do{ check = scanf("%f%c", &num, &c); if(check!=2|| c!='\n'||nummax){ printf("Please enter again!\n\t Enter a positive number smaller than 500: "); fflush(stdin); check = 0; }else{ if(check ==1); } }while(check==0); return num; } int checkKhach(int min, int max){ int num; int check; char c; do{ check = scanf("%d%c", &num, &c); if(check!=2|| c!='\n'||nummax){ printf("Please enter again!\n\t Enter a positive number smaller than 10000: "); fflush(stdin); check = 0; }else{ if(check ==1); } }while(check==0); return num; } int main(){ int hopT=200, hopB=50; float giaT, giaB, gia; int n, soT=0, soB=0; printf("What is the cost of a small package (in dollars)?\n"); giaB = checkGia(0.0,500.0); printf("What is the cost of a big package (in dollars)?\n"); giaT = checkGia(0.0,500.0); printf("How many invitation are yeu sending out?\n"); n = checkKhach(0,10000); if(4*giaB