STANAANDREY

BAC 16/12/2021

Dec 16th, 2021 (edited)
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. #include <ctype.h>
  4. #define NMAX 20
  5.  
  6. using namespace std;
  7. char s[NMAX];
  8.  
  9. int main() {
  10.     gets(s);
  11.     int n = strlen(s);
  12.     for (int i = 0; i < n; i++) {
  13.         if (islower(s[i])) {
  14.             strcpy(s + i, s + i + 1);
  15.             i--;
  16.             n--;
  17.         }
  18.     }
  19.     if (!n) {
  20.         strcpy(s, "CUVANT VID!");
  21.     }
  22.     puts(s);
  23.     return 0;
  24. }
  25.  
Add Comment
Please, Sign In to add comment