Guest User

Untitled

a guest
Feb 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. struct ADDRESS {
  6. string street;
  7. string city;
  8. string parish;
  9. string country;
  10. };
  11.  
  12. struct APPLICANT {
  13. string first_name;
  14. string last_name;
  15. string dob;
  16. ADDRESS address;
  17. };
  18.  
  19. int main() {
  20.  
  21. APPLICANT applicant;
  22.  
  23. cout << "Enter an applicant's details" << endl;
  24.  
  25. cout << "First Name\n";
  26. getline(cin, applicant.first_name);
  27.  
  28. cout << "Last Name\n";
  29. getline(cin, applicant.last_name);
  30.  
  31. cout << "Date of Birth\n";
  32. getline(cin, applicant.dob);
  33.  
  34. cout << "Street address\n";
  35. getline(cin, applicant.address.street);
  36.  
  37. cout << "City\n";
  38. getline(cin, applicant.address.city);
  39.  
  40. cout << "Parish\n";
  41. getline(cin, applicant.address.parish);
  42.  
  43. cout << "Country\n";
  44. getline(cin, applicant.address.country);
  45.  
  46. // Print out the details
  47.  
  48. cout << "\n\nFirst Name: " << applicant.first_name << endl;
  49. cout << "Last Name: " << applicant.last_name << endl;
  50. cout << "Date of Birth: " << applicant.dob << endl;
  51. cout << "Street address: " << applicant.address.street << endl;
  52. cout << "City: " << applicant.address.city << endl;
  53. cout << "Parish: " << applicant.address.parish << endl;
  54. cout << "Country: " << applicant.address.country << endl;
  55.  
  56. return 0;
  57. }
Add Comment
Please, Sign In to add comment