Question
Please check my work a. Design a program for Hunterville College. The current tuition is $20,000 per year, and tuition is expected to increase by
Please check my work
a. Design a program for Hunterville College. The current tuition is $20,000 per
year, and tuition is expected to increase by 3 percent each year. Display the
tuition each year for the next 10 years.
b. Modify the Hunterville College program so that the user enters the rate of
tuition increase instead of having it fixed at 3 percent.
c. Modify the Hunterville College program so that the user enters the rate of
tuition increase for the first year. The rate then increases by 0.5 percent each
subsequent year.
My Soloutions
Chapter 5 Lesson Exercise #10 a. Hunterville CollegeBruce Ledbetter
Design a program for Hunterville College. The current tuition is $20,000 per
year, and tuition is expected to increase by 3 percent each year. Display the
tuition each year for the next 10 years.
start
Declarations
num currenttuition, increaseamountyear, yearlyincrease, count
call calculatemodule()
stop
calculatemodule()
Declarations
currenttution = 20000
increaseamountyear = 0.03
count = 0
while (count <= 10) then
yearlyincrease = ((currenttuition * increaseamountyear) + 20000) + count
count++
endwhile
output "Yearly Tuition $" yearlyincrease
output "Year " count
Chapter 5 Lesson Exercise #10 b. Hunterville CollegeBruce Ledbetter
Modify the Hunterville College program so that the user enters the rate of
tuition increase instead of having it fixed at 3 percent.
start
Declarations
num currenttuition, increaseamountyear, yearlyincrease, count
input "Percent Yearly Increase " increaseamountyear
call calculatemodule()
stop
calculatemodule()
Declarations
currenttution = 20000
count = 0
while (count <= 10) then
yearlyincrease = ((currenttuition *increaseamountyear) + 20000) + count
count++
endwhile
output "Yearly Tuition $" yearlyincrease
output "Year " count
Chapter 5 Lesson Exercise #10 c.Hunterville CollegeBruce Ledbetter
Modify the Hunterville College program so that the user enters the rate of
tuition increase for the first year. The rate then increases by 0.5 percent each
subsequent year.
start
Declarations
num currenttuition, increaseamountyear, yearlyincrease, increaseamountfirstyear, count
input "Percent First Year Increase " increaseamountfirstyear
call calculatemodule()
stop
calculatemodule()
Declarations
currenttution = 20000
count = 0
increaseamountfirstyear
while (count <= 10) then
yearlyincrease = ((currenttuition *increaseamountfirstyear) + 20000) if count <= 1 and <= 10 then
yearlyincrease = ((currenttution * .5) + 20000) if count <> 10
count++
endwhile
output "Yearly Tuition $" yearlyincrease
output "Year " count
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started