VAshurov 1 year ago
parent
commit
17611209d4
2 changed files with 8 additions and 1 deletions
  1. 8 0
      js_hw2/price.js
  2. 0 1
      price.js

+ 8 - 0
js_hw2/price.js

@@ -0,0 +1,8 @@
+let coinprice = 50; // цена 1 монеты в $
+let totalcoin; // Кол-во монет при условии заполнения depo
+
+do {
+    let depo = prompt("Введите сумму для покупки монет",""); // узнаем сумму для покупки
+    totalcoin = depo/coinprice; //Кол-во монет
+    alert ("Вы получите - " + totalcoin + " " + "монет"); //выводим сколько получается монет
+}while(depo !== null)

+ 0 - 1
price.js

@@ -1 +0,0 @@
-asdasd