✔ 最佳答案
You would like to write a program that only accept the four characters. This can be achieved easily by checking the ASCII code of the input characters.
The pseudocode should be like this:
1. Declare a character type named A
2. Accept Input from keyboard and store the result in A
3. Examine ASCII code of A
4. If A is in the set of {'P', 'O', 'A', 'T', 'p', 'o', 'a', 't'} then write uppercase(A), otherwise jump back to step 2.
I don't know if this is what you want. It seems too easy to be asked.
If you have further questions, you are welcome to ask. I can also assist you in Chinese if you like.