SHARE
TWEET

Untitled

a guest Jan 17th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main() {
  2.  
  3.     Student arr[3];
  4.    
  5.     arr[0].setIQ(50);
  6.     arr[0].setName("gosho");
  7.     arr[0].setGrades();
  8.  
  9.     arr[1].setIQ(60);
  10.     arr[1].setName("pesho");
  11.     arr[1].setGrades();
  12.  
  13.     arr[2].setIQ(70);
  14.     arr[2].setName("qnko");
  15.     arr[2].setGrades();
  16.  
  17.     for (int i = 0; i < 3; ++i) {
  18.         cout << arr[i].getIQ() << " " << arr[i].getName() << endl;
  19.         cout << "Grades:";
  20.         for (int j = 0; j < 3; ++j) {
  21.             cout << arr[i].getGrade(j) << " ";
  22.         }
  23.         cout << endl;
  24.     }
  25.  
  26.     cout << "Is gosho smarter than pesho ?\n";
  27.     if (arr[0].isSmarterThan(arr[1])) {
  28.         cout << "yes.\n";
  29.     }
  30.     else cout << "no.\n";
  31.  
  32.     return 0;
  33. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top