美文网首页
2017-11-22

2017-11-22

作者: 乐乐果园7 | 来源:发表于2017-11-22 23:34 被阅读0次

#include "stdio.h"

#include "conio.h"

#include "math.h"

main()

{char c,str1[100],str2[100],str3[300];

int i,j;

printf("Please input the first string\nConfirm by Enter\n");

gets(str1);

printf("Please input the second string\nConfirm by Enter\n");

gets(str2);

for(i=0;(c=str1[i])!='\0';i++)

{str3[i]=str1[i];

};

j=i;

for(i=0;(c=str2[i])!='\0';i++,j++)

{str3[j]=str2[i];

};

printf("The string which has been connected is:\n%s",str3);

getch();

}

相关文章

网友评论

      本文标题:2017-11-22

      本文链接:https://www.haomeiwen.com/subject/awravxtx.html