-
Notifications
You must be signed in to change notification settings - Fork 0
/
math.js
49 lines (30 loc) · 861 Bytes
/
math.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
const result = Math.pow(3,8);
// console.log(result);
const num1= 25;
const num2= 45;
// const gap=Math.abs(num1 - num2) ;
// console.log(gap);
// if ( gap < 5){
// console.log('you guys can be friend')
// }
// else{
// console.log(' you guys stay apart')
// }
// -----------------------------------------------------------------------
const number= 2.4568;
const fullnumber=Math.round(number);
// console.log(fullnumber)
const result3= Math.ceil(2.1315);
// console.log(result3)
const result4= Math.floor(24524.1315);
// console.log(result4);
//random
// console.log(Math.random());
// const random=Math.random()*100;
// const random=Math.round(Math.random()*100);
// console.log(random);
for(let i = 0; i< 20; i++){
const random=Math.round(Math.random()*6);
console.log(random);
}
// math seach google-----------------------