The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Structure complited
By Guest on 16th January 2023 01:45:45 PM | Syntax: TEXT | Views: 127



New paste | Download | Show/Hide line no. | Copy text to clipboard
  1. #include<iostream>
  2. using namespace std;
  3. struct student
  4. {
  5.         string name;
  6.         int age;
  7.         char gender;
  8.         float weight;
  9. };
  10. int main()
  11. {
  12.         student temari[2];
  13.         for(int i=0;i<=1;i++)
  14.         {
  15.                 cout<<"Ente the info about a student "<<endl;
  16.                 cin>>temari[i].name;
  17.                 cin>>temari[i].age;
  18.                 cin>>temari[i].gender;
  19.                 cin>>temari[i].weight;
  20.         }
  21.         cout<<temari[0].name;
  22.  
  23. }



  • Recent Pastes
  • Questions
    13 hours 11 mins 53 secs ago
  • Adrs
    13 hours 17 mins 3 secs ago
  • Docs
    13 hours 17 mins 47 secs ago
  • Servs
    13 hours 18 mins 30 secs ago
  • Srvs
    13 hours 23 mins 19 secs ago