Advertisement
Aodai

subiect 3

Mar 19th, 2022
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. char s[20];
  8. int n, d, i;
  9. strcpy(s, "examen");
  10. n = strlen(s);
  11. d = 'a' - 'A';
  12. i = 0;
  13. while (i < n) {
  14. if (s[i] >= 'a' && s[i] <= 'h')
  15. s[i] = s[i] - d;
  16. i++;
  17. }
  18. cout << s;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement