Josif_tepe

Untitled

Dec 20th, 2025
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int n;
  6.     cin >> n;
  7.    
  8.     char c[n];
  9.    
  10.     for(int i = 0; i < n; i++) {
  11.         cin >> c[i];
  12.     }
  13.    
  14.     int samoglaski = 0;
  15.    
  16.     char nova_niza[n];
  17.     int nni = 0;
  18.     for(int i = 0; i < n; i++) {
  19.         if(c[i] == 'A' or c[i] == 'a' or c[i] == 'E' or c[i] == 'e' or c[i] == 'I' or c[i] == 'i' or c[i] == 'O' or c[i] == 'o' or c[i] == 'U' or c[i] == 'u') {
  20.            
  21.         }
  22.         else {
  23.             nova_niza[nni] = c[i];
  24.             nni++;
  25.         }
  26.     }
  27.    
  28.    
  29.     for(int i = 0; i < nni; i++) {
  30.         cout << nova_niza[i];
  31.     }
  32.     return 0;
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment