SHARE
TWEET

Untitled

a guest May 24th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //5/21/2019
  2. //Module 08
  3.  
  4. #include <iomanip>
  5. #include <string>
  6. #include <iostream>
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.    
  12.  
  13.    
  14.     cout << "Hello, welcome" << endl;
  15.  
  16.     cout << "Please enter a name no more than " << endl;
  17.    
  18.  
  19.     const int Name_length = 32;
  20.     char first_name[Name_length], middle_name[Name_length], last_name[Name_length];
  21.    
  22.     cout << " " << endl;
  23.  
  24.     cin.getline( first_name, Name_length - 1);
  25.  
  26.  
  27.     cout << "Please enter a name no more than " << endl;
  28.    
  29.     cin.getline(middle_name, Name_length - 1);
  30.  
  31.     cout << "Please enter a name no more than " << endl;
  32.  
  33.     cin.getline(last_name, Name_length - 1);
  34.  
  35.    
  36.     char Full_name[100];
  37.  
  38.     strcat_s(Full_name, last_name);
  39.     strcat_s(Full_name, first_name);
  40.     strcat_s(Full_name, middle_name);
  41.     cout << Full_name << endl;
  42.    
  43.  
  44.     system("pause");                                                //Pauses the program for the user to look at the data
  45.     return 0;
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top