例如:輸入1,印出a
- import java.util.Scanner;
- public class C1
- {
- public static void main(String[] args)
- {
- Scanner input = new Scanner(System.in);
- System.out.println("please enter a number:");
- int a = input.nextInt();
- int b = a + 96;
- System.out.println("The answer of the question is:" + (char)b);
- }
- }
沒有留言:
張貼留言