1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //EVALUTION
- let a = 5;
- let b, c;
- b = ((a) * (5));
- b = ((c) = ((b)/(2)));
- //AGE
- let age = prompt ('How old are you?')
- let year = (2022 - age )
- alert("You were born in " + year)
- //TEMPERATURE
- let temp = prompt ("How many degrees (C) ?") //Celciy
- let far = ((temp * (9/5)) + 32) // formula of C in Farengeit
- alert(far + "F")
- //DIVIDE
- let number1 = prompt("your fisrt number");
- let number2 = prompt("your second number");
- result = Math.floor(number1/number2);
- alert(result);
- //CURRENCY
- const rate = 36.372 ;// UAH
- let amount = prompt("Your amount dollars") ;// $
- let results = rate * amount;
- alert("In UAH: " + results.toFixed(2))
- //RGB
- const red = 255;
- let ared; // answer for color in (16)
- ared = red.toString(16);
- const green = 225;
- let agreen;
- agreen = green.toString(16);
- const blue = 249;
- let ablue;
- ablue = blue.toString(16);
- alert('Color in (16) : ' + ared + agreen + ablue );
- //FLATS
- let floors = 9 ;
- let flats = 4 ;
- let need = prompt('1 - last number of flats in build') ;
- let need_fl = need % (flats * floors);
- let number_flo = Math.ceil(need_fl / 4);
- let entrance = Math.ceil(need/(floors*flats))
- alert( 'You need floor № ' + number_flo + " Entrance № " + entrance )
|