返回列表 發帖
  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.         str[n]-=32;
  10.     }else{
  11.         str[n]+=32;
  12.     }
  13.     cout<<"The letter that was selected is: "<<str[n]<<endl;
  14.     cout<<str;
  15.     return 0;
  16. }
複製代碼

TOP

返回列表