Advertisement
Fakhru

Untitled

Feb 15th, 2014
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.97 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. struct Student{
  6. string name;
  7. string matrix;
  8. int age;
  9. string course;
  10. };
  11. int main()
  12. {
  13.  
  14. Student Person_A;
  15. Student Person_B;
  16.  
  17. Person_A.name = "Aminah";
  18. Person_A.matrix = "12DIP11F1001";
  19. Person_A.age = 18;
  20. Person_A.course = "DIP";
  21.  
  22. cout << "Please insert Person B's Name: " << endl;
  23. cin >> Person_B.name;
  24. cout << "Please insert Person B's Matrix Id: " << endl;
  25. cin >> Person_B.matrix;
  26. cout << "Please insert Person B's Age: " << endl;
  27. cin >> Person_B.age;
  28. cout << "Please insert Person B's Course: " << endl;
  29. cin >> Person_B.course;
  30.  
  31. cout << "\n\n\nPerson A Info\n\nName : " << Person_A.name << "\nMatrix Number : " << Person_A.matrix << "\nAge : " << Person_A.age << "\nCourse : " << Person_A.course << endl;
  32. cout << "\nPerson B info\n\nName : " << Person_B.name << "\nMatrix Number : " << Person_B.matrix << "\nAge : " << Person_B.age << "\nCourse : " << Person_B.course << endl;
  33.  
  34. system("pause");
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement