SHARE
TWEET

problema3

Radu94 Nov 19th, 2019 (edited) 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<iostream>
  2. #include<cstring>
  3. using namespace std;
  4. char a[200];
  5. int main()
  6. {
  7.     int n,i,M=0,m=0;
  8.     cin.getline(a, 200);
  9.     n=strlen(a);
  10.     for(i=0;i<=n;i++)
  11.     {
  12.         if(a[i]>=65&&a[i]<=90)
  13.         {
  14.             M++;
  15.         }
  16.         if(a[i]>=97&&a[i]<=122)
  17.         {
  18.             m++;
  19.         }
  20.     }
  21.     cout<<M<<" "<<m;
  22.     return 0;
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top