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



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[5];
  13.         cout<<"enter the student info "<<endl;
  14.         for(int i=0;i<=3;i++)
  15.         {
  16.                 cin>>temari[i].name;
  17.                 cin>>temari[i].age;
  18.         }
  19.         cout<<"the info of the students is "<<endl;
  20.         for(int i=0;i<=2;i++)
  21.         {
  22.                 cout<<temari[i].name<<endl;
  23.                 cout<<temari[i].age<<endl;
  24.         }
  25.         return 0;
  26. }



  • Recent Pastes
  • Questions
    14 hours 39 mins 39 secs ago
  • Adrs
    14 hours 44 mins 49 secs ago
  • Docs
    14 hours 45 mins 33 secs ago
  • Servs
    14 hours 46 mins 16 secs ago
  • Srvs
    14 hours 51 mins 5 secs ago