Advertisement
hawzze

homework

Mar 6th, 2021
849
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.35 KB | None | 0 0
  1.  
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     class speciality
  9. {
  10.     private:
  11.      char name[20]={ 'I'};
  12.      int man=36;
  13.      int woman=34;
  14.      int average_score=4;
  15.      int totalStudents=man+woman;
  16.    
  17.     public:
  18.     void input_speciality();
  19.    void output_speciality()
  20.         {
  21.              char name[20]={ 'I'};
  22.                cout << name;
  23.              int man=36;
  24.                 cout << man;
  25.              
  26.              return man;
  27.              return woman;
  28.              return average_score;
  29.         };
  30.    
  31.    void output_score(){
  32.     if(average_score=2)
  33.     {
  34.         cout<<"Slab 2"<<endl;
  35.     }
  36.     else if(average_score=3)
  37.     {
  38.         cout<<"Sreden 3";
  39.     }
  40.     else if(average_score=4)
  41.     {
  42.         cout<<"Dobur 4";
  43.     }
  44.     else if(average_score=5)
  45.     {
  46.         cout<<"Mnogo dobur 5";
  47.     }
  48.     else if(average_score=6)    
  49.     {
  50.    cout<<"Otlicen 6";
  51.     }
  52. else {
  53.     cout<<"ERROR!!!number is not between 2 & 6";
  54. }
  55. };
  56.  
  57.  
  58.     bool compare_num(int man, int woman)
  59.     {
  60.         if(man>woman)
  61.             {
  62.                  return true;
  63.             }
  64.             else
  65.             {
  66.                  return false;
  67.             }
  68.     };
  69.    
  70.     int number_students()
  71.     {
  72.         {
  73.             return totalStudents;
  74.         }
  75.        
  76.     };
  77.    
  78.    
  79. };
  80.  
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement