Computers and Technology

The Gas-N-Clean Service Station sells gasoline and has a car wash. Fees for the car wash are $1.25 with a gasoline purchase of $10.00 or more and $3.00 otherwise. Three kinds of gasoline are available: regular at $2.89, plus at $3.09, and super at $3.39 per gallon. User Request: Write a program that prints a statement for a customer. Analysis:
Input consists of number of gallons purchased (R, P, S, or N for no purchase), and car wash desired (Y or N). Gasoline price should be program defined constant. Sample output for these data is
Enter number of gallons and press 9.7
Enter gas type (R, P, S, or N) and press R
Enter Y or N for car wash and press Y

* *
* *
* Gas-N-Clean Service Station *
* *
* March 2, 2004 *
* * Amount Gasoline purchases 9.7 Gallons Price pre gallons $ 2.89 Total gasoline cost $ 28.03 Car wash cost $ 1.25 Total due $ 29.28 Thank you for stopping Pleas come again Remember to buckle up and drive safely

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 05:20, ashcormu11
Write a program called assignment3 (saved in a file assignment3.java) that computes the greatest common divisor of two given integers. one of the oldest numerical algorithms was described by the greek mathematician, euclid, in 300 b. c. it is a simple but very e↵ective algorithm that computes the greatest common divisor of two given integers. for instance, given integers 24 and 18, the greatest common divisor is 6, because 6 is the largest integer that divides evenly into both 24 and 18. we will denote the greatest common divisor of x and y as gcd(x, y). the algorithm is based on the clever idea that the gcd(x, y) = gcd(x ! y, y) if x > = y and gcd(x, y) = gcd(x, y ! x) if x < y. the algorithm consists of a series of steps (loop iterations) where the “larger” integer is replaced by the di↵erence of the larger and smaller integer. this continues until the two values are equal. that is then the gcd.
Answers: 3
image
Computers and Technology, 23.06.2019 22:30, keel5468
You draw two cards from a standard deck of 52 cards, but before you draw the second card, you put the first one back and reshuffle the deck. (a) are the outcomes on the two cards independent? why?
Answers: 3
image
Computers and Technology, 24.06.2019 07:30, sunny644
John recently worked on a project about various programming languages. he learned that though procedural language programs are useful, they have disadvantages too. what is a disadvantage of programs written in procedural languages? a. programs do not represent data complexity. b. programs take more time to execute. c. programs are prone to security threats. d. programs do not interface with multiple platforms.
Answers: 3
image
Computers and Technology, 24.06.2019 13:30, livie225
Type the correct answer in the box. spell all words correctly. what is the default margin width on all four sides of a document? by default, the document has a margin on all four sides.
Answers: 1
Do you know the correct answer?
The Gas-N-Clean Service Station sells gasoline and has a car wash. Fees for the car wash are $1.25 w...

Questions in other subjects: