void 合成小于的最大值()
{
char zhi[47] = "23121", sz[47] = "249";
int j = 0, jj = 0, cz = 0, sc = 0, zd = 0, xy = 0, bj = 0;//查找 输出 最大 标记 小于
//cin >> zhi >> sz;
while (zhi[j] != '\0')
if (sz[jj] != '\0' && !bj)
if (zhi[j] == sz[jj])cz = sz[jj] - '0', sc *= 10, sc += cz, (cz>zd ? zd = cz : 0), ++j, cz = jj = 0;
else (sz[jj] - '0'>zd ? zd = sz[jj] - '0' : 0), (zhi[j] > sz[jj] ? xy = sz[jj] - '0' : 0), ++jj;
else ((!cz && !bj) ? (xy ? sc *= 10, sc += xy : (sc > 10 ? sc = zd, sc *= 10, sc += zd : (sc ? sc = zd : 0)))
: (sc *= 10, sc += zd)), ++bj, ++j, xy = jj = 0;
cout << zhi << ends << sc;
}