fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <ctype.h>
  4. using namespace std;
  5.  
  6. string lower_case(string x)
  7. {
  8. std::transform(x.begin(), x.end(), x.begin(), ::tolower);
  9.  
  10. return x;
  11. }
  12.  
  13. int main()
  14. {
  15. string str = "HELLO WORLD";
  16. cout << lower_case(str);
  17.  
  18. return 0;
  19. }
  20.  
  21.  
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
hello world