1#include<bits/stdc++.h>
2using namespace std;
3main() {
4 string s = "Viet Nam";
5 transform(s.begin(), s.end(), s.begin(), ::tolower); //lowercase
6 cout << s << endl;
7}
8
1#include <cctype>
2#include <iostream>
3#include <cstring>
4#include <cstdio>
5
6using namespace std;
7
8int main()
9{
10 char str[] = "John is from USA.";
11
12 cout << "The lowercase version of \"" << str << "\" is " << endl;
13
14 for (int i=0; i<strlen(str); i++)
15 putchar(tolower(str[i]));
16
17 return 0;
18}