#include
#include
#include
#include //本程序中所使用函数声明
int main()
{
system("CLS"); // 清屏操作
char s1[200], s2[100];
char answer = 'y';
do
{
printf("-----------字符连接----------\n");
printf("请输入需要连接的两个字符串(用空格分开):");
scanf_s("%s %s", &s1, &s2);
int i, j;
for (i = 0; s1[i] != '\0'; i++);
for (j = 0; s2[j] != '\0'; j++)
s1[i++] = s2[j];
s1[i] = '\0';
puts(s1);
printf("\n是否还需要再次计算,如果需要,点击y键,否则n:\n");
answer = _getch();
} while (answer == 'y');
return 0;
}