Advertisement
Pop_Flaviu

19.11.2019-Pb3

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