Group ตัวอย่าง
moonoi
Index
Java : เปลี่ยนอุณหาภูมิ celsius => farenheit
Java : เปลี่ยนอุณหาภูมิ celsius => farenheit
Java : เปลี่ยนอุณหภูมิ เซลเซียส => ฟาเรนไฮ โดยรับค่าจากผู้ใช้ทาง MessangeBox
import javax.swing.*;
public class Convert_Temperature {
public static void main (String args[]) {
String temp = JOptionPane.showInputDialog(null, "Plese enter temperture (Celsius) : ", "Enter temperture", JOptionPane.QUESTION_MESSAGE);
double fDouble = Double.parseDouble(temp);
double cDouble = (5/9.0) * (fDouble - 32);
JOptionPane.showMessageDialog(null, "Degree Celsius : "+cDouble);
}
}
Create Date : 26 กรกฎาคม 2551
Last Update : 5 กันยายน 2555 14:32:12 น.
Counter : 945 Pageviews.
2 comment
Share to Facebook
Tweet
ผู้หญิงคนเดิม
Location :
[Profile ทั้งหมด]
ฝากข้อความหลังไมค์
Rss Feed
Smember
ผู้ติดตามบล็อก : 1 คน [
?
]
Webmaster - BlogGang
[Add ผู้หญิงคนเดิม's blog to your web]
Bloggang.com