Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Student
- {
- public:
- Student(int num1, int num2, int num3){
- score_from_lectures = num1;
- score_from_test = num2;
- score_from_labs = num3;
- }
- int score_from_lectures;
- int score_from_test;
- int score_from_labs;
- void evaluate(){
- int result = score_from_labs + score_from_lectures + score_from_test;
- if (result >=33)
- {
- cout<<"Отлично";
- }
- else if(result >= 28){
- cout<<"Хорошо";
- }
- else if(result >= 15){
- cout<<"Удовлетворительно";
- }
- else cout<<"Неудовлетворительно";
- }
- };
- int main()
- {
- Student persone(1,2,3);
- persone.evaluate();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement