2.7. Sales Tax - Java

in java •  9 years ago 

Starting out with Java: From control structures through objects

Chapter 2

Programming Challenges

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

7. Sales Tax 


Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales tax is 4 percent and the county sales tax is 2 percent. The program should display the amount of the purchase, the state sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sum of the amount of purchase plus the total sales tax).


Hint: Use the value 0.02 to represent 2 percent, and 0.04 to represent 4 percent.


Gaddis, Tony (2015-05-29). Starting Out with Java: From Control Structures through Objects (6th Edition) (Page 106). Pearson. 

Kindle Edition.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Bitcoin Address - 12uPbtoTBgxKG3ppxC2NSJYmmr5qipsbds

Ether Address - 0xb6f7D2d2127a56aF7D55CdBD7d327439A9005abF

Change tip address - kakradetome.tip.me

email - [email protected]


Thanks :)

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Upvoted you