Re: [問題] c語言程式求助

看板C_and_CPP作者 (非天夜翔)時間16年前 (2009/10/13 15:03), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串25/70 (看更多)
※ 引述《saxontai (黑暗,點綴孤零零的星)》之銘言: : AutoIt v3 ( http://www.autoitscript.com/autoit3/ ) : $input = InputBox("", "請輸入體重:", "") : $weight = Number($input) / 0.454 : MsgBox(0, "", "你的體重是 " & $input & " 公斤," & String($weight) & " 磅。") 應觀眾要求~~來個java版的~~ import javax.swing.JOptionPane; public class 我不會用C只好用JAVA { public static void main(String[] argv) { float kg = Float.parseFloat(JOptionPane.showInputDialog(null, "你的體重多少公斤?")); JOptionPane.showMessageDialog(null, kg + " KG = " + (kg /0.454) + " lb"); } } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 211.74.9.2

10/14 00:26, , 1F
好表xdd
10/14 00:26, 1F
文章代碼(AID): #1Ar9Q-gE (C_and_CPP)
討論串 (同標題文章)
文章代碼(AID): #1Ar9Q-gE (C_and_CPP)