Computer Science, asked by ananthimanoj, 4 months ago

can anyone give the answer without using function statement

Attachments:

Answers

Answered by tripathysrinivas70
0

Answer:

/** * To foster a sense of water conservation, the water department has an annual * water conservation tax policy. The taxes are based on the water consumption * of the consumer. The tax rates are as follows: * Water Consumed(in Gallons) Tax Rate in Rs. / 100 Gallons * Upto 45 No Tax * More than 45 but 75 or less 475.00 * More than 75 but 125 or less 750.00 * More than 125 but 200 or less 1225.00 * More than 200 but 350 or less 1650.00 * More than 350 2000.00 * Write a program to input the water consumed annually in gallons and * output the tax payable. */ import java.util.*; public class Qusetion68 { static void main() { Scanner sc=new Scanner(System.in); int consumed; double tax; System.out.println("Enter water consumed in Gallons:"); consumed=sc.nextInt(); if(consumed<=45) tax=0; else if(consumed<=75) tax=475.00; else if(consumed<=125) tax=750.00; else if(consumed<=200) tax=1225.00; else if(consumed<=350) tax=1650.00; else tax=2000.00; System.out.println("Tax Payable="+tax); } }

Answered by adeline68
1

Explanation:

which subject is it maths or some other and I'm sorry I am not so good at answering in maths

Similar questions