Mr.Preecha Prueprang
วันอาทิตย์ที่ 27 พฤษภาคม พ.ศ. 2555
บทที่ 9 การใช้ if ซ้อน if
class if2 {
public static void main(String[] args){
int a = 51;
if (a>0 && a<100){
if (a==51) {
System.out.println("print ok");
}else if (a==5){
System.out.println("print ok2");
}
}else {
System.out.println("Mr.Preecha Prueprang");
}
}
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น
บทความใหม่กว่า
บทความที่เก่ากว่า
หน้าแรก
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น