Advertisement
LilChicha174

Untitled

Jun 2nd, 2022
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.64 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.        
  5. class Student {
  6. public:
  7.     int lectures;
  8.     int test;
  9.     int labs;
  10.  
  11.     Student(int nm1, int nm2, int nm3) {
  12.         lectures = nm1;
  13.         test = nm2;
  14.         labs = nm3;
  15.     }
  16.  
  17.     void evaluate() {
  18.         int res = lectures + test + labs;
  19.         if (res >= 33) {
  20.             cout << "Отлично";
  21.         } else if (res >= 28) {
  22.             cout << "Хорошо";
  23.         } else if (res >= 15) {
  24.             cout << "Удовлетворительно";
  25.         }
  26.         else{
  27.             cout << "Неудовлетворительно";
  28.         }
  29.     }
  30. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement