Сделал таск 6

parent dc453e5c
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Task 6</title>
</head>
<body>
<script>
const userAnswer = parseInt(prompt('Введите кол-во секунд:'))
console.log(`Осталось ${userAnswer} секунд`)
const hours = Math.floor(userAnswer / 3600)
if(hours > 1) {
console.log(`Осталось ${hours} часов`)
} else if(hours === 1) {
console.log(`Остался ${hours} час`)
} else {
console.log(`Осталось менее часа`)
}
</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