My Opera is closing 3rd of March

La Hoàng Nam

Tạm biệt em nhé ! Chào em ....

Bài tập đầu tiên của Java by example !!!

CÁi này mình copy của thằng Phương , còn bài mình chưa làm xong , hê hê ! Dùng Netbean nhé

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

/**
*
* @author phuongnm_t0808h1
*/
public class IQ {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int choice,traloi,diem=0,dt = 0;
boolean flag=true,flag1=true,flag2=true,flag3=true;
System.out.println("Ban Thi Lan may?");
choice=new java.util.Scanner(System.in).nextInt();
switch(choice){
case 1:
do{
System.out.println("1. Aptitude");
System.out.println("2. Enghlish");
System.out.println("3. Math");
System.out.println("4. GK");
System.out.println("5. exit");
choice=new java.util.Scanner(System.in).nextInt();
switch(choice){
case 1:
if(flag==true){
flag=false;
System.out.println("what is the capital of Viet Nam?");
System.out.println("1. Ha Noi");
System.out.println("2. Bac Ninh");
traloi=new java.util.Scanner(System.in).nextInt();
if(traloi==1){
System.out.println("Ban tra loi dung va duoc cong 10 diem");
diem+=10;
}
else
System.out.println("Ban tra loi sai");
}
else
System.out.println("Ban da thi cau hoi nay roi!");
break;
case 2:
if(flag1==true){
flag1=false;
System.out.println("SQL stand for ?");
System.out.println("1. Struct query Langage");
System.out.println("2. Street");
traloi=new java.util.Scanner(System.in).nextInt();
if(traloi==1){
System.out.println("Ban tra loi dung va duoc cong 10 diem");
diem+=10;
}
else
System.out.println("Ban tra loi sai");
}
else
System.out.println("Ban da thi cau hoi nay roi!");
break;
case 3:
if(flag2==true){
flag2=false;
System.out.println("1+1= ?");
System.out.println("1. 1+1=2");
System.out.println("2. 1+1=3");
traloi=new java.util.Scanner(System.in).nextInt();
if(traloi==1){
System.out.println("Ban tra loi dung va duoc cong 10 diem");
diem+=10;
}
else
System.out.println("Ban tra loi sai");
}
else
System.out.println("Ban da thi cau hoi nay roi!");
break;
case 4:
if(flag3==true){
flag3=false;
System.out.println("1+2=?");
System.out.println("1. 1+2=3");
System.out.println("2. 1+2=5");
traloi=new java.util.Scanner(System.in).nextInt();
if(traloi==1){
System.out.println("Ban tra loi dung va duoc cong 10 diem");
diem+=10;
}
else
System.out.println("Ban tra loi sai");
}
else
System.out.println("Ban da thi cau hoi nay roi!");
break;
case 5:
break;
default:
System.out.println("Moi ban chon lai");
}
}while(choice!=5);
if(diem==10)
dt=0;
else if(diem==20)
dt=2;
else if(diem==30)
dt=5;
else if(diem==40)
dt=10;
System.out.println("Diem Thuong:"+dt);
System.out.println("Tong Diem:"+(diem+dt));
if(diem+dt==10)
System.out.println("Muc IQ: IQ cua ban duoi muc trung binh");
else if(diem+dt==22)
System.out.println("Muc IQ: IQ cua ban trung binh");
else if(diem+dt==35)
System.out.println("Muc IQ: IQ cua ban thong minh");
else if(diem+dt==50)
System.out.println("Muc IQ: IQ cua ban thien tai");
else
System.out.println("Ban phai thi lai");
break;
default:
System.out.println("Khong duoc thi qua 1 lan");
break;
}

}

}bigsmile bigsmile bigsmile bigsmile bigsmile

Đau chân quá đi mất , huhu1 câu chuyện buồn :|

Write a comment

New comments have been disabled for this post.

February 2014
M T W T F S S
January 2014March 2014
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28