Advertisement
Guest User

Click to Edit Title

a guest
Sep 17th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.55 KB | None | 0 0
  1. #include <iostream>
  2. #include<string>
  3. using namespace std;
  4.  
  5. struct student {
  6.     string name;
  7.     float final_mark;
  8. };
  9.  
  10.  
  11.  
  12. int main(int argc, char** argv) {
  13.    
  14.     student stu;
  15.    
  16.     cout<<" Please enter the students names"<<endl;
  17.     cout<<" followed by thier degrees:"<<endl;
  18.    
  19.        for ( int i = 0; i < 100 ; i   )
  20.      {
  21.         cin >> stu.name ;
  22.         cin >> stu.final_mark ;
  23.     }
  24.    
  25.     cout<<" students who passed are:"<< endl;
  26.    
  27.     for ( int i = 0; i < 100 ; i   )
  28.      {
  29.         if (stu.final_mark>= 60 )
  30.     cout << stu.name << endl;
  31.     // cout << stu.final_mark;
  32.     }
  33.  
  34.    
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement