Originally Posted by
whiteflags
Can you please post code of your attempt?
cpp.sh/7z2yt
Code:
#include <stdio.h>
#include <string.h>
int main()
{
char in[30];
char in2[30];
char inx;
int x,y,z,a,b,c;
printf ("Input Word : ");
scanf("%s",&in);fflush(stdin);
printf("Input Word 2 : ");
scanf("%s",&in2);fflush(stdin);
x=strlen(in);
y=strlen(in2);
if (x==y)
{
for (z=0;z<=x || z<=y;z++)
{
printf("%c %c",in[z],in2[z]);
printf("\n");
}
}
else
{
for (z=0,a=0;z<=30,a<=30;z++,a++)
{
printf("%c %c\n",in[z],in2[a]);
}
}
getchar();
return 0;
}