Computers and Technology

Althe the program to meet the new specifications.

// 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()
stop

startup()
output "enter a price or 0 to quit"
input price
return

mainloop()
totaltax = price * state_tax_rate + price * city_tax_rate
total = price + totaltax
output "price is " , price, " and total tax is ", totaltax
output "total is ", total
output "enter a price or 0 to quit"
input price
return

finishup()
output "end of program"
return

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:00, bnvghnbbb
Match the following. 1. show grouping of word processing tasks that can be performed quick access toolbar 2. shortcut location for commonly used elements scroll bars 3. organized commands used to modify documents ribbon 4. used to align and measure content in a word screen zoom bar 5. vertical and horizontal bars that are used to navigate through a document contextual tabs 6. displays the name of the document in use ruler 7. allows users to enlarge or shrink a visual of a word document title bar
Answers: 2
image
Computers and Technology, 23.06.2019 03:00, SKYBLUE1015
What are the different parts of computer
Answers: 2
image
Computers and Technology, 23.06.2019 10:50, Leffew
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
image
Computers and Technology, 24.06.2019 10:20, silviamgarcia
Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit' ('exit' should not be added to the list). these values entered by the user are added to a list we call 'initial_list'. then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. finally, inside print out all of the values in the new list. for example: input: enter value to be added to list: a enter value to be added to list: b enter value to be added to list: c enter value to be added to list: exit output: a b c a b c a b c note how 'exit' is not added to the list. also, your program needs to be able to handle any variation of 'exit' such as 'exit', 'exit' etc. and treat them all as 'exit'.
Answers: 2
Do you know the correct answer?
Althe the program to meet the new specifications.

// this program accepts any number of...

Questions in other subjects: