Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- float water,subtotal,price;
- printf("Entre com o consumo de agua (em m^2) de sua casa :\n"); scanf("%f",&water);
- if ((water>=0)&&(water<=10)) subtotal = water*0.69;
- else if ((water>10)&&(water<=15)) subtotal = water*1.17;
- else if ((water>15)&&(water<=25)) subtotal = water*1.48;
- else subtotal = water*1.6;
- price = subtotal + (subtotal*0.025) + 5;
- printf("O valor da conta de agua eh : %f\n",price);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment