#include <stdio.h>
#include <conio.h>
int main()
{
int i;
float e,f,g,n,x,z,t;
char User[3] = {'H','C','I'};
float a = 45;
float b = 25000;
float c = 50000;
float d = 75000;
for(i=0;i<=3;i++){
printf("\nInput select the User groups common household \n1. H\n2. C\n3. I\n: ");
scanf("%s",&User[i]);
printf("\nInput the amount of water used: ");
scanf("%f",&n);
x = n*0.5;
z = x + a;
e = n - 4000000;
t = (e*0.25) + b;
f = c + b;
g = d + b;
if(User[i] == 'H'){
printf("Your fee = %f\n",a);
printf("Your water bill = %f\n",z);
}
if(User[i] == 'C' && n <= 4000000){
printf("Your water bill = %f\n",b);
}
if(User[i] == 'C' && n > 4000000){
printf("Your water bill = %f\n",t);
}
if(User[i] == 'I' && n <= 4000000){
printf("Your water bill = %f\n",b);
}
if(User[i] == 'I' && n > 4000000 && n <= 10000000){
printf("Your water bill = %f\n",f);
}
if(User[i] == 'I' && n > 10000000){
printf("Your water bill = %f\n",g);
}
}
getch();
}