返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. ifstream ifs;
  4. ofstream ofs;
  5. string str;
  6. int main()
  7. {
  8.     ifs.open("read.txt");
  9.     getline(ifs,str);
  10.     ofs.open("write.txt");
  11.     for(int i=0;i<str.length();i++)
  12.     {
  13.         char c=str[i]+2;
  14.         ofs<<c;
  15.     }
  16.     return 0;
  17. }
複製代碼

TOP

返回列表