char letter[26]{ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
char lett = 'm';
for (int lettindx = 0; lettindx <= 25; lettindx++) {
int lettindx2 = lettindx + 1;
if (lettindx2 <=5 && letter[lettindx] == lett) {
lettindx2 *= 2;
break;
}
if (6 <= lettindx2 <= 10 && letter[lettindx] == lett) {
int modlett = lettindx2 % 3;
modlett *= 5;
break;
}
if (11 <= lettindx2 <= 15 && letter[lettindx] == lett) {
int intpart = lettindx2 / 4;
cout << letter[intpart - 1] << endl;
有关更多详细信息:我想将m
作为值并获得x
的值。
为什么我的程序不打印任何内容?