#include <iostream>
#include <fstream>
#include <cctype>
#include <cstring>
using namespace std;
int main( ){
ifstream fin;
ofstream fout;
fin.open("my.cpp");
fout.open("mynew.cpp");
string str;
while (!fin.eof()) {
getline(fin, str);
int n;
n = str.length();
for (int i = 0; i < n; i++) {
if (isalpha(str[i]))
fout << static_cast<char>(tolower(str[i]));
else
fout << str[i];
}
fout<< endl;
}
fin.close();
fout.close();
return 0;
}
Comments
Leave a comment