Josif_tepe

Untitled

Jan 31st, 2026
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. //#include <bits/stdc++.h>
  3. using namespace std;
  4. int main() {
  5.    
  6.     int x;
  7.     cin >> x;
  8.     string s;
  9.     cin >> s;
  10.    
  11.     string alphabet = "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba";
  12.     for(int i = 0; i < s.length(); i++) {
  13.         int mesto = s[i] - 'a';
  14.         mesto += x;
  15.        
  16.         cout << alphabet[mesto];
  17.     }
  18.     return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment