repl.it
@Hariz_Hazril/

lulus 3 kali lol

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • script.js
  • style.css
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
  <head>
    <title>Struktur Kawalan</title>
  </head>
  <body>

<h1>Penggunaan Struktur Kawalan </h1>
    <script>
			var mkh;
			mkh = prompt("Masukkan markah");
			document.write("Markah = "+ mkh +"<br>");

			if(mkh >=0 && mkh <=49)
			document.write("GAGAL");

			for(i=0; i<3; i++)
			{
				if (mkh >=50 && mkh <=100)
      document.write("LULUS <br>");
			}
		</script>
  </body>
</html>
result
console