var1 = 10
var2 = 20
wksum = 0
rslt = 0
do while var2 < 30
wksum = var1 + var2
if wksum > 30
var1 = var1 - 2
var2 = var2 + 1
var1 = var1 - 1
var2 = var2 + 3
end while loop
rslt = var1 + var2
If the person is over 65, the output should be "You are eligible for the
discounted senior rate."
If the person is between the age of 12 and 64, the output should be "You are
eligible for the regular adult rate."
If the person is 11 or under, the output should be "You are eligible for the
discounted child's rate."
Hint: Order is an important consideration when solving this problem!
(20 points) Take in the total amount of a donation you pledged and the
number of payments that you plan to make and determine the amount of each
payment. Say if you pledge 100 and say you are making 4 payments that means
25 dollars per payment. Display the amount of the payment.
(25 points) You have a product that is on sale. Each day of the sale, the price drops 10% from its previous
price. The sale lasts for 4 days. You should write a program that processes this problem using a loop.
Take in the original cost of the item. For each pass through the loop should generate the sales price for
each day the item is on sale along with the day number. For example, if the item
costs $10, your output will say "Day 1: Sales Price x, Day 2: Sales Price y",
etc. (replacing x and y with the correct sales price total).
(25 points) You need to calculate the total water bill for a household. If
the household has utilized at least 100 gallons they will pay $1 per gallon for the first
25 gallons and $0.50 for the remaining gallons. If they have not utilized at
least 100 gallons, they will be charged $1 per gallon for the first 50 gallons and $0.50
for the remaining gallons.