Question
(C++) Develop a program that will determine a student's college bill using an if else if statement . The total bill (tuition and room &
(C++) Develop a program that will determine a student's college bill using an if else if statement. The total bill (tuition and room & board) depends on status of in or out-of-state, and status of on campus or off campus student. The tuition for in state students is $3000 and $4500 for students who live out of state. The Room and Board for in-state students is $2500 and $3500 for students who are out of state (Declare these as constants). You must ask the student to input 'I' if they're in-state or 'O' if out-of-state. You must then ask the student to input 'Y' if student requires room and board and 'N' if not (develop a variable named status to get the first response and variable named room to get the second response). Be sure to check for invalid input and display the message shown on the example output below.
The total bill should be the sum of INSTATE TUITION and INSTATE ROOM, if the student is in state and requires room and board. Make sure to initialize total bill to 0. Also declare constants: INSTATETUITION with value 3000, OUTSTATETUITION with value 4500, INSTATEROOM with value 2500, and OUTSTATEROOM with value 3500. (Don't use
G. C:\Windows\system32\cmd.exe o x Are you in or out of state? Please input 'I' if you are in-state or 'o' if you a. re out-of-state Do you need room on campus? Please input 'Y' for yes or 'N' for no Total bil1 is: 5500 Press any key to continue i MI TO' if you a o GESC:\Windows\system32\cmd.exe Are you in or out of state? Please input 'I' if you are in-state or re out-of-state Do you need room on campus? Please input 'Y' for yes or 'N' for no Total bil1 is: 8000 Press any key to continue by CX C:\Windows\system32\cmd.exe Are you in or out of state? Please input 'I' if you are in-state or 'o' if you a re out-of-state Do you need room on campus? Please input 'Y' for yes or 'N' for no Total bil1 is: 3000 Press any key to continue n "O' if you a CIN. C:Windows\system32\cmd.exe Are you in or out of state? Please input 'I' if you are in-state or re out-of-state lo Do you need room on campus? Please input 'Y' for yes or 'N' for no n Total bil1 is: 4500 Press any key to continue Please input 'I' if you are in-state or 'O' if you are out-of-state i Please input 'V' if you require room and board and 'N' if you do not X You did not input valid data Press any key to continue
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