Advertisement
DidiMilikina

04. Concatenate Data

Sep 18th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7.     string first_name;
  8.     string last_name;
  9.     string town;
  10.     int age;
  11.     cin >> first_name >> last_name >> age >> town;
  12.  
  13.     printf("You are %s %s, a %d-years old person from %s.\n",
  14.         first_name.c_str(),
  15.         last_name.c_str(),
  16.         age,
  17.         town.c_str());
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement