Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2020
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <iostream>
  3.  
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int age;
  10. cin >> age;
  11.  
  12. string gender;
  13. cin >> gender;
  14.  
  15. if (gender == "f")
  16. {
  17. if (age >= 16)
  18. {
  19. cout << "Ms.";
  20. }
  21. else
  22. {
  23. cout << "Miss";
  24.  
  25. }
  26. }
  27. else
  28. {
  29. if (age >= 16)
  30. {
  31. cout << "Mr.";
  32. }
  33. else
  34. {
  35. cout << "Master";
  36.  
  37. }
  38. }
  39.  
  40.  
  41.  
  42. return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement