html
html
1
2
3
4
5
6
7
8
9
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
css
css
1
2
3
body {
}
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var min=prompt("min number");
var max=prompt("max number");
function code(){
var ran=Math.round(Math.random()*max);
if(ran>=min && ran<=max){
alert (ran)
}
else if(max<min){
alert ("min>max!");
}
else{
code();
}
}
setTimeout(code,10);
BROWSER
Console
Run