fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4. #include <ctype.h>
  5. using namespace std;
  6.  
  7. void erasefirstsmall(string& t)
  8. {
  9. string::iterator pos = find_if(t.begin(), t.end(), ::islower);
  10. t.erase(pos);
  11. }
  12.  
  13. int main()
  14. {
  15. cout << "introduce text\n";
  16. string text;
  17. getline(cin, text);
  18. erasefirstsmall(text);
  19. cout << text << '\n';
  20. }
  21.  
Success #stdin #stdout 0.01s 2860KB
stdin
Hello, Test
stdout
introduce text
Hllo, Test