Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. `introducir el código aquí`
  2. #include<stdio.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5.  
  6. main(){
  7. char separador[]=" ";
  8. char cad1[100],*ap1;
  9. char cad2[100],*ap2;
  10.  
  11.  
  12. printf("Introduce tu primer cadenan");
  13. fflush(stdin);
  14. gets(cad1);
  15.  
  16. printf("Introduce tu segunda cadenan");
  17. fflush(stdin);
  18. gets(cad2);
  19.  
  20. ap1=strtok(cad1,separador);
  21. ap2=strtok(cad2,separador);
  22.  
  23. while(ap1!=NULL&&ap2!=NULL){
  24. printf(" %s",ap1);
  25. printf(" %s",ap2);
  26. ap1=strtok(NULL,separador);
  27. ap2=strtok(NULL,separador);
  28. }
  29.  
  30.  
  31. system ("pause");
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement