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 2
By Guest on 16th January 2023 01:48:28 PM | Syntax: TEXT | Views: 50



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;
  13.         cout<<"Ente the info about a student "<<endl;
  14.         {
  15.                 cin>>temari.name;
  16.                 cin>>temari.age;
  17.                 cin>>temari.gender;
  18.                 cin>>temari.weight;
  19.                 cout<<temari.name<<endl;
  20.                 cout<<temari.age<<endl;
  21.                 cout<<temari.gender<<endl;
  22.                 cout<<temari.weight<<endl;
  23.                 return 0;
  24.         }
  25.        
  26. }



  • Recent Pastes