![sofiaisabelaguozdpez](/avatars/39785.jpg)
sofiaisabelaguozdpez
06.03.2020 •
Computers and Technology
// This program accepts any number of purchase prices// and computes state sales tax as 6% of the value// and city sales tax as 2% of the value// Modify the program so that the user enters// the two tax rates// at the start of the pricenum STATE_TAX_RATE = 0.06num CITY_TAX_RATE = 0.02num totalTaxnum totalstartUp()while price not equal to 0mainLoop()endwhilefinishUp()stopstartUp()output "Enter a price or 0 to quit"input pricereturnmainLoop()totalTax = price * STATE_TAX_RATE + price * CITY_TAX_RATEtotal = price + totalTaxoutput "Price is " , price, " and total tax is ", totalTaxoutput "Total is ", totaloutput "Enter a price or 0 to quit"input pricereturnfinishUp()output "End of program"return
Solved
Show answers
More tips
- B Business and Finance How to Open an Online Store? A Detailed Guide for Beginners...
- L Leisure and Entertainment What can be considered an antique: defining and valuing old objects...
- L Leisure and Entertainment Choosing the Right Books to Read: Tips and Recommendations...
- C Computers and Internet Step-by-Step Guide on How to Download Music to Your iPhone...
- H Health and Medicine Naskol ko Opasen Ukus Kleshcha i Kak Ego Raspoznat...
- F Family and Home How to Choose Suitable Windows for Your Home?...
- L Leisure and Entertainment What Movies You Should Watch: A Guideline to Make the Right Decision...
- L Leisure and Entertainment How to Identify a Song? Which Program Can Recognize a Song by Its Melody?...
- H Health and Medicine Coughing: Causes, Types, and Treatment Methods...
- F Family and Home Parquet or laminate, which is better?...
Answers on questions: Computers and Technology
- C Computers and Technology Did you know ctrl + W will solve all your problems?...
- M Mathematics Write the Letter that corresponds to the correct ratio in the submission box for each problem For Triangle ABC (Figure 1) find the Match the fraction with the Trig ratio Match...
- S Social Studies Choose all the true statements about the beliefs of Legalism. People are born evil. People that followed the law would be rewarded in the afterlife. A strong and harsh government...
- M Mathematics If AB is 15 inches, and AC is (4y-1), what is the value of y?...
- M Mathematics Please help, will mark brainliest!! For exercises 10-12, find the rule for each function table....
- C Chemistry A woman gives birth to a son what is the probability that her second child with a girl? A.0 percent B.25 percent C.50 percent D.100 percent...
- H History What role does competition play in a capitalist economy?...
- H History Why is it important for people to study the Holocaust...
- M Mathematics Your pay stub or earnings statement will list only list some of your withholding and deductions. You need to ask your employer to view the full list of taxes that are withheld....
- H History Which of these was not a contributing factor to the start of world war I?...
Ответ:
Question:
// This program accepts any number of purchase prices
// and computes state sales tax as 6% of the value
// and city sales tax as 2% of the value
//Modify the program so that the user enters
// the two tax rates
// at the start of the program
start
Declarations
num price
num STATE_TAX_RATE = 0.06
num CITY_TAX_RATE = 0.02
num totalTax
num total
startUp()
while price not equal to 0
mainLoop()
endwhile
finishUp()
stopstartUp()
output "Enter a price or 0 to quit"
input price
returnmain
Loop()
totalTax = price * STATE_TAX_RATE + price * CITY_TAX_RATE
total = price + totalTax
output "Price is " , price, " and total tax is ", totalTaxoutput "Total is ", total
output "Enter a price or 0 to quit"
input price
return finishUp()
output "End of program"
return
Answer
Modified Program below
// This program accepts any number of purchase prices
// and computes state sales tax as 6% of the value
// and city sales tax as 2% of the value
//Modify the program so that the user enters
// the two tax rates
// at the start of the program
start
Declarations
num price
num STATE_TAX_RATE
num CITY_TAX_RATE
num totalTax
num total
input STATE_TAX_RATE
input CITY_TAX_RATE
startUp()
while price not equal to 0
mainLoop()
endwhile
finishUp()
stopstartUp()
output "Enter a price or 0 to quit"
input price
returnmain
Loop()
totalTax = price * STATE_TAX_RATE + price * CITY_TAX_RATE
total = price + totalTax
output "Price is " , price, " and total tax is ", totalTaxoutput "Total is ", total
output "Enter a price or 0 to quit"
input price
return finishUp()
output "End of program"
return
Ответ:
Here is the answer but am not so sure
14in
25in
48in