返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;

  3. int main()
  4. {
  5.     ifstream ifs;
  6.     ofstream ofs;
  7.     string str;
  8.     ifs.open("read.txt");
  9.     ofs.open("write.txt");
  10.     getline(ifs,str);
  11.     for(int i=0;i<str.length();i++){
  12.         ofs<<char(str[i]+2);
  13.     }
  14.     return 0;
  15. }
複製代碼

TOP

返回列表