Advertisement
desislava_topuzakova

Untitled

Jan 7th, 2023
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. //1. прочитаме име, фамилия, възраст, град
  7. //2. отпечатваме: "You are <firstName> <lastName>, a <age>-years old person from <town>."
  8. string name;
  9. string lastName;
  10. string town;
  11. int age;
  12. cin >> name;
  13. cin >> lastName;
  14. cin >> age;
  15. cin >> town;
  16.  
  17. cout << "You are " << name << " " << lastName << ", a " << age << "-years old person from " << town << ".";
  18.  
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement