# Modify the sales tax program to accept an arbitrary number of prices, total them, calculate the sales tax and print the total amount.

Lunakar Reddy
Modify the sales tax program to accept an arbitrary number of prices, total them, calculate the sales tax and print the total amount.
1 Answer(s)      5 years and 10 months ago
Posted in : Java Beginners
Modify the sales tax program to accept an arbitrary number of prices, total them, calculate the sales tax and print the total amount.

November 4, 2011 at 5:46 PM

```class salestax {

public static void main (String[] args) {

double total = 0;
double price;

int i = 0;
while (i < args.length) {
price = Double.valueOf(args[i]).doubleValue();
total = total + price;
i = i + 1;
}
double salestax = total * 0.0825;
System.out.println("Sales tax is " + salestax);

}

}
```

Modify the sales tax program to accept an arbitrary number of prices, total them, calculate the sales tax and print the total amount.
Modify the sales tax program to accept an arbitrary number of prices, total them, calculate the sales tax and print the total amount.  Modify the sales tax program to accept an arbitrary number of prices, total them, calculate
Calculate Sales Tax using Java Program
Calculate Sales Tax using Java Program In this section, you will learn how to calculate the sales tax and print out the receipt details for the purchased... Products [y/n]: n 1 Chocolate at 15.75(including tax) Sales Taxes: 0.75 Total: 15.75
program to print total marks
program to print total marks  program to input total marks out of 600 marks as an argument and print the stream allotted using the following criteria 401 & above - PCM 301-400 - ZBC 201-300- Commerce 101-200 - Arts
How to write a program count total prices
How to write a program count total prices  Hi. all I've got a assignment to write a program that count total prices of 8 costumers. First class... stuck in count total prices of 8 costumers like in this picture ![alt text][1
How to write a program count total prices
How to write a program count total prices  Hi. all I've got a assignment to write a program that count total prices of 8 costumers. class... the number of cartons for Customer %s: ",counter); enterQ = input.nextInt
Calculate total number of elements remaining in the buffer.
Calculate total number of elements remaining in the buffer. In this tutorial, we will discuss how to calculate total number of elements remaining...     .println("Number of remaining elements
tax calculation
tax calculation  I want you to write a program while take some amount and do the tax calculation Sr.No. Particulars Present Rate Amount in INR... will take 132.3 and give the tax amounts from that.... WAP a java program
how to calculate the employee tax - JSP-Servlet
how to calculate the employee tax  How to calculate the employee tax.Can u please send to me calculation tables
PHP Tax Calculator - PHP
PHP Tax Calculator  In my project i required a tax calculator that can calculate the property tax
sales detail
be displayed. ï?® Calculate the cost of the garments as given below: Total cost...sales detail  creation of applet for sales deatils form the applet for Sales Details must include the following: ï?® The CartID, OrderNo, OrderDate
Java program to generate the total count
Java program to generate the total count  I need a java program which would take a text file as an input and scans through it to generate the output. For Ex. : If the text file contains the following information: There is/are 3
Write a query to find the total number of rows in a table
Write a query to find the total number of rows in a table  Write a query to find the total number of rows in a table?   Hi, Here is the answer, we can find the total number of rows in a table using following query
calculate total hours by start time and end time in javascript - Ajax
calculate total hours by start time and end time in javascript  hi, i... well. i want to display total hours by using start and end timepicker. pls clarify my doubts. how to calculate total hours by using start and end time field
total id
total id  how to print and total my id number ..for example if my id is 0123456789 the output will look like this : 0123456789 0+1+2+3+4+5+6+7+8+9=45 help me plz
Sales Letters Write Services
Sales Letter Writing One of the best tips for sales letter writing... page is a nightmare of most of the writers and if it is writing for the sales copy... of effective sales letter writing have increased a lot. And demand of a skilled writer
Total Hours Calculation.
Total Hours Calculation.   Hi,How to calculate the total hours by startime and endtime.not railway time just only normal time.please help. Thanks
Sales Management
of sales team and assist them in case of any difficulty during achieving... of advertisement. Under sales promotional program, sales manager select what should... is responsible for the handling of sales management and leading sales team called
Find total disk space in PHP, php disk_total_space, disk_total_space
Learn How to Get the total disk space in PHP Program. In this PHP Tutorial example we will use the disk_total_space() function in our PHP code to find the total disk space. syntax disk_total_space() Function PHP disk_total_space
I am creating one jsp page in which I read in a text file, then display that data in tabular format. Now I need to calculate a total.
that data in tabular format. Now I need to calculate a total.  I am reading...;" + "<th> Batch Number </th>" + "<th> amount <...... } The output displays 4 rows and 2 columns. How can I calculate the total
Total summay from a sale table
Total summay from a sale table  Total summay from a sale table
Retail Point Of sales (using jsp and servlet)
Retail Point Of sales (using jsp and servlet)  Hi, i want to know how... module which you can list all the available products to process sales on new sales... to start coding for processing sales thats the only missing on my project please
Java Applet - Adding a Button to Decrease a Total
it will count the total number of times you click the button. What I need is for their to be a second button that when clicked will decrease that total amount...); } public void paint(Graphics g) { g.drawString("Total: " + gettestone
Travelling Sales MAn Using GA - IoC
Travelling Sales MAn Using GA  travelling sales man problem using ga first i have randomly select few cities which will be called population size ex 10 cities are there then all the possible combination will be 10
Sales System.. Need Help!! - Java Beginners
Sales System.. Need Help!!  were going to make a sales system in our subject Database management and that will be our project, we already have a company to use. But the problem is.. our group dont know how to start, we dont have
modify program
modify program  Hi how could I modify this program so that if I say... the information and would stop if no is selected.As the program is now if I say.... address 1: address 2: address 3: post code: code: quantity: the is the program
Simple java program
marks up the prices of its items by 25%. Write a Java program that declares... variable named original_price 3. a double variable named sales_tax_rate.... the sales tax rate 5. the sales tax 6. the final price of the item (the final
Write a program to calculate factorial of any given number
program to calculate factorial of any given number. First of all define a class... Factorial Examples - Java Factorial Example to calculate factorial of any given number
java total lost data in hard drive
java total lost data in hard drive  please help me, i need java source code about total lost data in hard drive. how to find the total deleted data ih hard drive using java programming... this my project...pls help me
java total lost data in hard drive
java total lost data in hard drive  please help me, i need java source code about total lost data in hard drive. how to find the total deleted data ih hard drive using java programming... this my project...pls help me
java total lost data in hard drive
java total lost data in hard drive  please help me, i need java source code about total lost data in hard drive. how to find the total deleted data ih hard drive using java programming... this my project...pls help me
JAVA TOTAL LOST DATA IN HARD DRIVE
JAVA TOTAL LOST DATA IN HARD DRIVE  please help me, i need java source code about total lost data in hard drive. how to find the total deleted data ih hard drive using java programming... this my project...pls help me