Need help Fast!

Use a while loop to allow the user to enter the number of credit hours a student plans to take next semester. The program should allow the user to enter the number of credit hours as many times as desired. Be sure to use the appropriate sentinel value. The program should display a message with the student fees each time the user enters a new set of credit hours.

The tuition is based on the number of credit hours a student registers, as shown below:

Number of credit hours Student Fees

1 – 5 $270.00

6 – 11 $540.00

12 and over $820.00

If the user enters credit hours zero or below, display the appropriate error message.

The code should take the tuition and total it up after each time the user inputs data
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main()
{
    //declare variable
    int credHours = 0;
    const double credHoursOne = 270.00;
    const double credHoursTwo = 540.00;
    const double credHoursThree = 820.00;
    
    cout << "Enter Credit Hours (Enter 0 to end): ";
    cin >> credHours;
    
Topic archived. No new replies allowed.