###### tags: `實習題目` # 翻譯機 ## Description 你需要幫一個教授翻譯,教授說的內容實際上是對應鍵盤上按鍵的往左數過去的第二個按鍵。 **ex:** k往左數過去的第二個按鍵為h - 輸入要翻譯幾個句子 - 輸入測資 **提示:** 1. 需用到cin.ignore()來清除緩衝區 ```cpp= cin.ignore(); ``` 2. ```cpp= #include<string> ``` 3. 使用getline()讀取使用者輸入的值 ```cpp= getline(cin,string_variable); ``` 4. 有些按鍵其實根本不用被考慮 ## Constraint * 請將英文字母統一變成小寫 ## **Input** 使用者先輸入一個整數代表要輸入幾個需要翻譯的句子。 再輸入需要翻譯的句子。 ## **Output** 將翻譯過後的句子輸出。 ## **Sample Input** ``` 3 k[r dyt I[o j[[g .[y,p,j FDi kp U[ UKpF b 'D,JodjT ``` ## **Sample Output** ``` how are you good morning say hi to this c language ``` --- <!-- **更多測資** [測資A](https://cpe.cse.nsysu.edu.tw/cpe/file/attendance/problemPdf/testData/uva10222a.php) [測資B](https://cpe.cse.nsysu.edu.tw/cpe/file/attendance/problemPdf/testData/uva10222b.php) --> <!-- **出處:** [2021-10-19 CPE](https://cpe.cse.nsysu.edu.tw/cpe/file/attendance/problemPdf/10222.pdf) -->
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up