Advertisement
Cucura_Georgiana

Tema - informatica

Nov 18th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. Varianta 58, Subiect 2, Exercitiu 5
  2.  
  3. #include<iostream>
  4. #include<cstring>
  5. using namespace std;
  6. char x[100], cuv[100];
  7. int main()
  8. {
  9.     int i, c=0;
  10.     cin.getline(x, 100);
  11.     for(i=0; i<strlen(x); i++)
  12.     {
  13.         if(toupper(x[i])>='A' && toupper(x[i])<='Z')
  14.         {
  15.             cuv[c]=x[i];
  16.             c++;
  17.         }
  18.     }
  19.     cout<<cuv;
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement