Advertisement
zachdyer

First Name Last Name

Dec 21st, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. enum { max_length = 127};
  5. static char first[max_length];
  6. static char last[max_length];
  7.  
  8. int main( int argc, char *argv[]) {
  9.    
  10.     printf("What is your first name: ");
  11.     gets(first);
  12.    
  13.     printf("What is your last name: ");
  14.     gets(last);
  15.  
  16.     printf("Your name is %s %s", first, last);
  17.    
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement