java輸出三個數(shù)的最大值 java中怎么比較三個數(shù)的最大值?
java中怎么比較三個數(shù)的最大值?包jaz導入java.util.Scanner文件Public class Max{Public static void main(string[]args){]//
java中怎么比較三個數(shù)的最大值?
包jaz
導入java.util.Scanner文件
Public class Max{
Public static void main(string[]args){]//可以監(jiān)視鍵盤數(shù)據(jù)
scanner SC=new scanner(系統(tǒng)輸入)
系統(tǒng)輸出打印(“輸入第一個整數(shù)”
int a=sc.nextInt公司()
系統(tǒng)輸出打?。ā拜斎氲诙€整數(shù)”
int b=sc.nextInt公司()
系統(tǒng)輸出打?。ā拜斎氲谌齻€整數(shù)”
int c=sc.nextInt公司()
系統(tǒng)輸出打?。ā拜敵鲎畲笾怠?/p>
int max=A>B?A:b
max=max>C?最大值:c
系統(tǒng)輸出打?。ā白畲笾凳恰睂τ诘谌齻€問題,我可以學習[1]-]5]-]6]-]6]-]6]-]6]-]8]-]6]-]6]-]6]-]6]-]6]-]8]-]6]-]6]-]6]-]8]-]6]-]6]-]6]-]6]-]6]-]6]-]6]-]6]-]6]-]6]-]6]-]6]-]6]-]6]-]6]-]6]—]6]-]6]-]6]-]6答案/交流小組/學習方法/就業(yè)信息)等。歡迎大家一起分享資源。