Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <ctype.h>
  4. //18.
  5. //Read in a string the first name and the last name of a person (both en-
  6. //tered on the same line).
  7. void main (void)
  8. {
  9. char f_name[20];
  10. char l_name[20];
  11. // printf("Enter your first name: ");
  12. // scanf("%s", f_name);
  13. // printf("Enter your last name: ");
  14. // scanf("%s", l_name);
  15. // printf("");
  16. // printf("Your name is %s %s", f_name, l_name);
  17.  
  18.  
  19. printf("\n\nPe aceeasi linie: ");
  20. scanf("%s%s",f_name, l_name);
  21. printf("Your name is %s %s", f_name, l_name);
  22.  
  23. getch();
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement