VSC++=》 不调用函数正序a反序b存入c数组匹配最长字符串

void 不调用函数正序a反序b存入c数组匹配最长字符串()
{//缘由https://ask.csdn.net/questions/1061247
	char a[44]{}, b[44]{}, c[44]{};
	int j = 0, jj = 0;
	cout << "输入2个字符串" << endl;
	cin >> a >> b;
	while (a[j] != '\0')c[j] = a[j++];
	while (b[jj++] != '\0'); --jj;
	while (jj--)if (b[jj] != '\0')c[j++] = b[jj];
	j = 0; while (c[j] != '\0')cout << c[j++];
	cout << endl << "输入5个字符串" << endl;
	char d[5][20]{};
	j = jj = 0; int aa = 0, aaa = 0;
	while (jj < 5)cin >> d[jj++];
	while (d[0][j] != '\0' || d[1][j] != '\0' || d[2][j] != '\0' || d[3][j] != '\0' || d[4][j] != '\0')++j;
	while (--jj)
	{
		while(d[jj][aa++] != '\0');
		if (--aa < j)
		while (aa + aaa < j)cout << "*", ++aaa;
		aaa = 0;
		while (aaa < aa)cout << d[jj][aaa++];
		cout << endl, aa = 0, aaa = 0;
	}
}

VSC++=》 不调用函数正序a反序b存入c数组匹配最长字符串_第1张图片

你可能感兴趣的:(c++,c语言,算法)