-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath.html
More file actions
42 lines (35 loc) · 869 Bytes
/
math.html
File metadata and controls
42 lines (35 loc) · 869 Bytes
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
<!doctype html>
<head>
<meta charset="UTF-8">
</head>
<body>
<script>
var r=parseInt(prompt("Podaj promien",""));
alert(Math.pow(r,2)*Math.PI);
var losFloat=Math.random()*6+1;
var los=Math.floor(losFloat);
alert(los);
alert(4/3*Math.PI*Math.pow(r,3));
var tab=[];
var tab2=[];
var liczba=0;
for(var i=0;i<6;i++){
tab2.push(parseInt(prompt("Podaj "+(i+1)+" liczbe do totka","")));
}
for(var i=0;i<6;i++){
tab.push(Math.floor(Math.random()*49+1));
for(var y=0;y<6;y++){
if(tab[i]==tab2[y]){
liczba++;
}
}
document.write(tab[i]+"<br>");
}
document.write("Trafiłeś "+liczba+" z 6");
document.write("<br><br>");
var naz=[];
naz=["Kowalski","Nowak","Pies","Nie","ABC"];
document.write(naz[Math.floor(Math.random()*4)]);
</script>
</body>
</html>