Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- int juryCount, counter = 0;
- cin >> juryCount;
- cin.ignore();
- string command;
- getline(cin,command);
- double score = 0, totalAverage = 0;
- while (command != "Finish") {
- string presentation = command;
- double average = 0;
- for (int i = 0; i < juryCount; i++) {
- cin >> score;
- average += score;
- }
- printf("%s - %.2f.\n", presentation.c_str(), average / juryCount);
- totalAverage += average;
- counter++;
- cin.ignore();
- getline(cin, command);
- }
- printf("Student's final assessment is %.2f.\n", totalAverage / (counter * juryCount));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement