Browse over 20 million
homework answers & study documents

Prg 210 Pseudocode Embedded & Required Outputs

Type

Homework

Rating

Showing Page:
1/5
Processing steps to produce the required outputs are:
Leaded Gas Purchase
o # gallons of gas purchased | multiply | leaded gas price | gas price
o # gallons of gas purchased | multiply | federal tax | amount2
If Gas-n-Go, then # gallons of gas purchased |Add | charge |Total |
multiply | sales tax | amount3
Gas price |add | amount2|add | amount3 |= Total Bill END
If Full-Service, then # gallons of gas purchased |Add | service
charge |Total | multiply | sales tax | amount3
Gas price |add | amount2|add | amount3 |= Total Bill END
o Otherwise, # gallons of gas purchased | multiply | sales tax | amount3
o Gas price |add | amount2|add | amount3 |= Total Bill END
Unleaded Gas Purchase
o # gallons of gas purchased | multiply | unleaded gas price | gas price
o # gallons of gas purchased | multiply | federal tax | amount2
If Gas-n-Go, then # gallons of gas purchased |Add | charge |Total |
multiply | sales tax | amount3
Gas price|add | amount2|add | amount3 |= Total Bill END
If Full-Service, then # gallons of gas purchased |Add | service
charge |Total | multiply | sales tax | amount3
Gas price |add | amount2|add | amount3 |= Total Bill END
o Otherwise, # gallons of gas purchased | multiply | sales tax | amount3
o Gas price |add | amount2|add | amount3 |= Total Bill END

Sign up to view the full document!

lock_open Sign Up
Pseudocode Embedded:
Leaded Gas Purchase
o # gallons of gas purchased | multiply | leaded gas price | amount 1
Read gallons purchased
Read leaded gas price
amount1=gallons_purchased*leaded
o # gallons of gas purchased | multiply | federal tax | amount 2
Read gallons purchased
Get federal tax
amount2 = gallons_purchased * tax_gas
o If Gas-n-Go, then # gallons of gas purchased |Add | charge |Total | multiply |
sales tax | amount 3
Read gallons purchased
Get charge
Total=gallons_ purchased+charge
Get sales tax
amount3=Total *tax_sales
o amount 1 |add | amount 2|add | amount 3 |= Total Bill END
Get amount1
Get amount2

Sign up to view the full document!

lock_open Sign Up

Sign up to view the full document!

lock_open Sign Up

Anonymous
Had to paraphrase some of the content but overall, really useful material.

Anonymous
Thanks, good work

Anonymous
Heard about Studypool for a while and finally tried it. Glad I did caus this was really helpful.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4