RomanR 4 years ago
commit
e8c2a63de2
1 changed files with 29 additions and 0 deletions
  1. 29 0
      index.html

+ 29 - 0
index.html

@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Calculator</title>
+</head>
+<body>
+    <script>
+        console.log('the calculating program consumption electricity by lamp'); 
+        alert('You run the deno-version of calculating program consumption electricity by lamp. Press "OK" for continue');
+        var P = prompt('Enter power of 1 lamp--W');//Nominal P-parameter need for calculate our general consumption electricity
+        console.log(P);
+        var Number = prompt('Enter number of lamps--part/parts');// Enter number of lamps which calculate
+        console.log(Number);
+        var Hours = prompt('Enter the working lamp`s hours--hour/hours');//How much time lap/lamps working? Need it for calculate our general consumption electricity
+        console.log(Hours);
+        var Result = (P * Number * Hours)/1000;//we transform W to kW
+        console.log(Result);
+        alert('Result calculates in kilo-Watts');
+        alert('If you want to know how much does it costs press "Ok"');
+        var Tariff = prompt('Enter the price for 1kW', [0.9]);//our tarification for Price calculating
+        console.log(Tariff);
+        var Price = Tariff*Result;// to know how much costs our consumption electricity 
+        console.log(Price);
+        alert ('Result calculates in hrivnias');
+    </script>
+</body>
+</html>