Advertisement
Radityanugrap

Uji Level

Sep 14th, 2020
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  var nilai =prompt("masukkan nilai anda")
  2.     var grade =""
  3.  
  4.     if (nilai >= 98){
  5.     grade = "A"  
  6.     } else if(nilai >=80){
  7.     grade = "B"
  8.     } else if(nilai >=75){
  9.     grade = "C"
  10.     } else if(nilai >= 60){
  11.     grade ="D"
  12.     }else if(nilai >= 40){
  13.     grade ="E"
  14.     }else if(nilai >= 0){
  15.     grade = "F"
  16.     }
  17.    
  18.     document.write("<p>Grade anda adalah :",grade, "<p>");
  19.    
  20.         alert("anda harus masukkan nilai yg benar")
  21.     if (pilihan == true){
  22.         alert('anda telah mengulang')
  23.     }else{
  24.         alert('anda tidak menulang')
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement