fork(1) download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. int main() {
  8. string s = "Onetwothree";
  9. int lc = count_if(s.begin(), s.end(), [](char ch) { return std::islower(ch); });
  10. int uc = count_if(s.begin(), s.end(), [](char ch) { return std::isupper(ch); });
  11. cout << uc << " " << lc << endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
1 10