nucLeaRsc2

Untitled

Nov 8th, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. int main ()
  4. {
  5.     char a[100],b[100],*p,*q;
  6.     int n=0;
  7.     printf("Introdu a,b:");
  8.     scanf("%s%s",a,b);
  9.     p=a;q=b;
  10.     while(p!=0 && q!=0)
  11.     {p++;q++;printf("%s%s",*p,*q);}
  12.     if(p==0)
  13.        while(q!=0)
  14.        {n--;q++;}
  15.     else
  16.        while(p!=0)
  17.        {n++;p++;}
  18.     printf("%d",n );
  19.     getch();
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment