Browse Source

K9N6HL9U4Y

Анатолий Пивоварский 1 year ago
commit
295f25fb2c
3 changed files with 22 additions and 0 deletions
  1. 0 0
      css/style.css
  2. 13 0
      index.html
  3. 9 0
      js/script.js

+ 0 - 0
css/style.css


+ 13 - 0
index.html

@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Lenoleum price</title>
+    <script src="./js/script.js"></script>
+</head>
+<body>
+    
+</body>
+</html>

+ 9 - 0
js/script.js

@@ -0,0 +1,9 @@
+let linoleumprice = 50; //цена ленолиума за 1 квадратный метр
+let price ;     //объявление переменной для результата
+
+do{                                                   //цикл
+	let numberofsquaremeters  = prompt("Введите количество квадратных метров.",""); //просим пользователя ввести количество квадратных метров ленолиума
+	price    =  numberofsquaremeters * linoleumprice;         //считаем общую сумму
+	alert(price + "грн");                           //выводим общую сумму
+}while(numberofsquaremeters !== null)             //пока пользователь не нажмет отмену
+