Skip to content

Instantly share code, notes, and snippets.

@NhanKhangg98
Created September 17, 2022 08:53
Show Gist options
  • Save NhanKhangg98/22f82104830144883507bb380f8b3910 to your computer and use it in GitHub Desktop.
Save NhanKhangg98/22f82104830144883507bb380f8b3910 to your computer and use it in GitHub Desktop.
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