#include <iostream>
#include <cmath>
using namespace std;
int main() {
int rating;
int count = 0;
double sum = 0;
while (true) {
cout << "Please enter the intern's rating (3 - 5): ";
cin >> rating;
if (rating < 3 || rating > 5) {
break;
}
count++;
sum += rating;
}
double average = sum / count;
cout << "The average rating is: " << average << endl;
return 0;
}