Advertisement
informaticage

to lower string

May 23rd, 2021
957
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main () {
  5.   string s = "HeLLo WorlD";
  6.  
  7.   for(size_t i = 0; i < s.length(); i++) {
  8.     s[i] = tolower(s[i]);
  9.   }
  10.  
  11.   cout << s;
  12.   return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement