close
題目概要:
判斷數字大小。
解題方向:
直接if就可解決。
程式碼:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Java | |
import java.util.Scanner; | |
class uva11172{ | |
public static void main(String args[]){ | |
Scanner sc=new Scanner(System.in); | |
int cases=sc.nextInt(); | |
for(int i=0;i<cases;i++){ | |
long a=sc.nextLong(),b=sc.nextLong(); | |
if(a>b)System.out.println(">"); | |
else if(a<b)System.out.println("<"); | |
else System.out.println("="); | |
} | |
} | |
} |
文章標籤
全站熱搜