|
@@ -0,0 +1,88 @@
|
|
|
+// Год рождения //
|
|
|
+
|
|
|
+//let years = prompt('How old are you ?')
|
|
|
+//alert('You were born in ' + (2020 - years))
|
|
|
+
|
|
|
+// =============================================//
|
|
|
+// Температура //
|
|
|
+
|
|
|
+//let degree = prompt('what is your temperature ?')
|
|
|
+//alert('Your temperature is ' + (degree * (9/5) + 32) + ' Fahrenheit');
|
|
|
+
|
|
|
+//==============================================//
|
|
|
+// Number: divide //
|
|
|
+
|
|
|
+//let firstNumber = prompt('Write some number');
|
|
|
+//let secondNumber = prompt('Write some number');
|
|
|
+//alert(Math.floor(firstNumber/secondNumber));
|
|
|
+
|
|
|
+//==============================================//
|
|
|
+// Number: odd //
|
|
|
+
|
|
|
+// let number = prompt('Write a number');
|
|
|
+// if(+number) {
|
|
|
+// alert('good job');
|
|
|
+// } else {
|
|
|
+// alert('Print an even number or not even');
|
|
|
+// number;
|
|
|
+// }
|
|
|
+
|
|
|
+//==============================================//
|
|
|
+// String: greeting //
|
|
|
+
|
|
|
+// let name = prompt('What is your name ?');
|
|
|
+// alert('Hello ' + name);
|
|
|
+
|
|
|
+//==============================================//
|
|
|
+// String: lexics //
|
|
|
+
|
|
|
+// let text = prompt('Write some text here');
|
|
|
+// if(text.includes('fuck')) {
|
|
|
+// alert("Don't use curse words, you fucking asshole");
|
|
|
+// } else {
|
|
|
+// alert("It's fine, bro");
|
|
|
+// }
|
|
|
+
|
|
|
+//==============================================//
|
|
|
+// confirm //
|
|
|
+
|
|
|
+// let idiot = confirm('Are you idiot ?')
|
|
|
+// alert(idiot);
|
|
|
+
|
|
|
+//==============================================//
|
|
|
+// Boolean //
|
|
|
+
|
|
|
+// let children = confirm('Do you have children ?')
|
|
|
+// let childrenNumber = children;
|
|
|
+
|
|
|
+//==============================================//
|
|
|
+// Boolean: if //
|
|
|
+
|
|
|
+// let penis = confirm('Do you have a penis ?')
|
|
|
+// if(penis == true) {
|
|
|
+// alert('Congratulations, you are the man ! ! ! ! !')
|
|
|
+// } else {
|
|
|
+// alert('Feel sorry for you, you are the girl')
|
|
|
+// }
|
|
|
+
|
|
|
+//==============================================//
|
|
|
+// Array: real //
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// СНИНИЙ ПОЯС //
|
|
|
+
|
|
|
+let apps = 144;
|
|
|
+let entry = 4;
|
|
|
+let floor = 9;
|
|
|
+let k = prompt('Введи номер квартиры')
|
|
|
+let a = apps / (entry * floor); // квартир на этаже
|
|
|
+let ab = apps / entry; // в одном подъезде квартир
|
|
|
+let cb = Math.trunc(1 + (k - 1) / ab); // Номер подъезда
|
|
|
+let cd = Math.trunc(1 + ((k - 1) % ab) / a); // Номер этажа
|
|
|
+alert('Подъезд: ' + cb + ' Этаж; ' + cd);
|
|
|
+
|
|
|
+//==============================================//
|