bogdanNiculeasa

acronim

Jan 11th, 2023
823
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | Software | 0 0
  1. #include <iostream>
  2. #include<string.h>
  3. #include<cctype>
  4. using namespace std;
  5.  
  6. int isVowel(char ch);
  7. int isConsonant(char ch);
  8.  
  9. int main()
  10. {
  11.     char s[101];
  12.     cin.getline(s, 101);
  13.     char* pch = strtok(s, " ");
  14.     while (pch != NULL) {
  15.         if (pch[0] >= 65 && pch[0] <= 90) {
  16.             cout << pch[0];
  17.         }
  18.        /* if (isupper(pch[0])) {
  19.             cout << pch[0];
  20.         }*/
  21.         pch = strtok(NULL, " ");
  22.     }
  23.     return 0;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment