- import java.util.Scanner;
- public class Ac {
- public static void main(String[] args) {
- // TODO 自動產生的方法 Stub
- Scanner c = new Scanner(System.in);
- int a,s;
- System.out.print("請輸入第一個數:");
- a = c.nextInt();
- System.out.print("請輸入第二個數:");
- s = c.nextInt();
- if(a>s)
- {
- System.out.print(a+">"+s);
- }else if(a<s)
- {
- System.out.print(a+"<"+s);
- }else
- {
- System.out.print(a+"="+s);
- }
- }
- }
複製代碼 |