So far is what I've got:
#include<fstream>
#include<iomanip>
#include<string>
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
float matric = 47.60;//matriculation fee
int hrz;//semester hours
float regroom = 387.29;//rate for regular room
float acroom = 496.49;//rate for AC room
float dip = 38.00;//diploma fee
float food = 619.66;//rate for food
int stunum;//student ID #
float credit = 239.33;//cost of each semester hour
char R;//regular room
char A;//AC room
char Y;//Yes
char N;//No
cout<<"Please enter the student #"<<endl;
cin>>stunum;
cout<<stunum<<endl;
cout<<"What are the number of semester hours?"<<endl;
cin>>hrz;
if (hrz>21)
cout<<"You are exceeding 21 semester hours"<<endl;
else if(hrz<12)
cout<<"You are taking less than 12 semester hours"<<endl;
float totalfeez = credit * hrz;//total fee for individual student
cout<<totalfeez<<endl;
cout<<"Please enter your Room Choice: (R/A)"<<endl;
cout<<"Is the student graduating?: (Y/N)"<<endl;
cout<<food<<endl;
cout<<matric<<endl;
cout<<dip<<endl;
return 0;
}
The assignment:
A local university charges 239.33 for each semester hour of credit., 387.29 per semester for a regular room, 496.49 for an air-conditioned room and 619.66 per semester for food. All students are charged a 47.60 matriculation fee. Graduating students must pay a diploma fee of 38.00.
Write a C++ program that will compute the fees that must be paid by a student. Input from the keyboard will be as follows:
Student # (a four digit #)
Number of semester hours
Room choice('R' for regular, 'A' for air-conditioned)
Graduating ('Y' for yes, 'N' for no)
After all input is typed in, then clear the screen. Output will be as follows:
Student #
A warning message if the student is taking more than 21 hours or less than 12.
Tuition amount
Room: Air conditioned or regular
Food
Matriculation fee
Diploma Fee(if student is graduating).
All help is appreciated....I've having a hard time visualizing how I'd have the options (i.e. Y, N, R, A) being interactive and thus using it to accurately get the student's costs.
Have a good day.