TQC+ JAVA 202 比較大小
import java.util.*;
class JPA02 {
static Scanner keyboard = new Scanner(System.in);
public static void main(String[] args) {
test();
test();
}
public static void test() {
int a,b;
System.out.println("Input:");
a=keyboard.nextInt();
b=keyboard.nextInt();
if(a>b)
System.out.println(a+" is larger than "+b);
else
System.out.println(b+" is larger than "+a);
}
}
沒有留言:
張貼留言