java 輸入數(shù)據(jù) JAVA程序.輸入3個(gè)數(shù)字?
JAVA程序.輸入3個(gè)數(shù)字?我會(huì)改變你的方式:導(dǎo)入javax.swing.JOptionPanepublic class Arrange{public static void main(String
JAVA程序.輸入3個(gè)數(shù)字?
我會(huì)改變你的方式:導(dǎo)入javax.swing.JOptionPanepublic class Arrange{public static void main(String args[]){String str int x,y,z int temp str=JOptionPane.showInputDialog(“請輸入第一個(gè)數(shù)字”)x=整數(shù).parseInt(str)str=JOptionPane.showInputDialog(“請輸入第二個(gè)數(shù)字”)y=整數(shù).parseInt(str)str=JOptionPane.showInputDialog(“請輸入第三個(gè)數(shù)字”)Z=整數(shù).parseInt(str)如果(x>y){temp=y y=x x=temp}如果(y>z){temp=y=z z=temp}如果(x>y){temp=y=x x=temp}系統(tǒng)輸出打?。ā皬男〉酱?”x“”Y“”Z)}