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

  3. int main()
  4. {
  5.     string str;
  6.     char b;
  7.     ifstream ifs;
  8.     ifs.open("C:\\Users\\student\\Downloads\\read.txt");

  9.     ifs>>str;


  10.     for(int i=0;i<str.length();i++){
  11.         b=str[i];
  12.         b=b+2;
  13.         cout<<b;
  14.     }


  15.     return 0;
  16. }
複製代碼

TOP

返回列表