Complete MP09
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/html.html to edit this template
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>TODO supply a title</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script>
|
||||
var userInput = prompt("Please enter your grade.");
|
||||
|
||||
if (userInput < 60) {
|
||||
var output = "F";
|
||||
} else if (userInput < 69.5) {
|
||||
var output = "D";
|
||||
} else if (userInput < 79.5) {
|
||||
var output = "C";
|
||||
} else if (userInput < 89.5) {
|
||||
var output = "B";
|
||||
} else {
|
||||
var output = "A";
|
||||
}
|
||||
|
||||
document.write(output);
|
||||
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
Reference in New Issue
Block a user