Created
September 17, 2022 08:53
-
-
Save NhanKhangg98/22f82104830144883507bb380f8b3910 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function kiemTra(mon1, mon2, mon3, khuVuc, doiTuong, diemChuan){ | |
| let totalDiem = mon1 + mon2 + mon3; | |
| if(khuVuc === "A") totalDiem += 2 | |
| if(khuVuc === "B") totalDiem += 1 | |
| if(khuVuc === "C") totalDiem += 0.5 | |
| if(doiTuong === 1) totalDiem += 2.5 | |
| if(doiTuong === 2) totalDiem += 1.5 | |
| if(doiTuong === 3) totalDiem += 1 | |
| if ( mon1 !== 0 && mon2 !== 0 && mon3 !== 0 && totalDiem >= diemChuan) | |
| console.log(`thi sinh duoc tong ${totalDiem} va dau`) | |
| else console.log(`thi sinh duoc tong ${totalDiem} va khong dau`) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment