|
@@ -1,26 +1,27 @@
|
|
|
-// let a = +prompt("enter your year of birth")
|
|
|
-// let b = 2020-a
|
|
|
-// alert("Your age:"+b)
|
|
|
+let yearOfBirth = +prompt("enter your year of birth");
|
|
|
+let yourAge = 2020-yearOfBirth;
|
|
|
+alert("Your age:"+yourAge);
|
|
|
|
|
|
|
|
|
+let temperatureCelsius = +prompt("temperature degrees Celsius");
|
|
|
+let temperatureFahrenheit = temperatureCelsius * 1.8 + 32;
|
|
|
+alert(temperatureFahrenheit);
|
|
|
|
|
|
-// let t = +prompt("temperature in degrees Celsius")
|
|
|
-// let T = t*1.8+32
|
|
|
-// alert(T)
|
|
|
|
|
|
-// let x=+prompt("enter the numerator")
|
|
|
-// let y=+prompt("enter the denominator")
|
|
|
-// alert(Math.floor(x/y))
|
|
|
+let numerator= +prompt("enter the numerator");
|
|
|
+let denomerator= +prompt("enter the denominator");
|
|
|
+alert(Math.floor(numerator/denomerator));
|
|
|
|
|
|
|
|
|
-// let n=+prompt("enter the namber");
|
|
|
-// if(n % 2==0){
|
|
|
-// alert("число четное");
|
|
|
-// }else{
|
|
|
-// alert("число нечетное")
|
|
|
-// }
|
|
|
+let number= +prompt("enter the number");
|
|
|
+if(number % 2==0){
|
|
|
+alert("число четное");
|
|
|
+}else{
|
|
|
+alert("число нечетное");
|
|
|
+};
|
|
|
|
|
|
-// let name = prompt("Enter your name")
|
|
|
+let name = prompt("Enter your name");
|
|
|
+alert(`Hey, ${name}!`);
|
|
|
// alert("Hey,"+name+"!"+" How are you?")
|
|
|
|
|
|
|