返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. string str;
  4. int n;
  5. int main()
  6. {
  7.     cin>>str>>n;
  8.     if(str[n]>='a')
  9.     {
  10.         str[n]=str[n]-32;
  11.     }
  12.     else
  13.     {
  14.         str[n]=str[n]+32;
  15.     }
  16.     cout<<"The letter that was selected is: "<<str[n]<<endl;
  17.     cout<<str;
  18. }
複製代碼

TOP

返回列表