Java Bootcamp Resources ->
Module 1 ->
6. Arrays, open Workbook 6.9.
Timmy went to the Java Grocer and bought four items at these prices:
1.99 -- 2.99 -- 3.99 -- 4.99
He would like to know what the prices are after-tax. Since you're the Java Grocer's best cashier, they want you to build a program that updates the prices after-tax.
Inside main, an array stores each price. Create a new array
afterTax with the same length.
In the Java world, the tax rate is 13%. Use a
for loop to update each element in
afterTax to be:
price + 13% * price .
Print the following messages:
The original prices are: <original prices>
The prices after tax are: <after tax prices>
Arrays.toString to print the arrays.