Сделал таск 7

parent 1c124f46
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Task 7</title>
</head>
<body>
<script>
const numA = Math.floor(Math.random() * 9)
const numB = Math.floor(Math.random() * 9)
const correctAnswer = numA * numB
const userAnswer = parseInt(prompt(`${numA} * ${numB} = ?`))
if(isNaN(userAnswer) !== true) {
if(userAnswer === correctAnswer) {
alert('You correct!')
} else {
alert('You wrong')
}
} else {
alert('Нужно ввести числовые значение.')
}
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment