J - Следующая буква
#include <bits/stdc++.h> using namespace std; int main() { char x; cin >> x; int k = x - 'a'; k = (k + 1) % 26; cout << char(k + 'a'); return 0; } /* '0' = 48 '1' = 49 '2' = 50 ... '9' = 57 'A' = 65 'B' = 66 'C' = 67 ... 'Z' = 90 'a' = 97 'b' = 98 'c' = 99 'd' = 100 ... 'z' = 122 */
Leave a Comment