-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathland.html
42 lines (34 loc) · 845 Bytes
/
land.html
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>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
let a = parseInt(prompt("Enter the amount"))
let b = prompt("Y if alive or N if died")
let c = parseInt(prompt("Number of boys"))
let d = parseInt(prompt("Number of girls"))
if(b == "Y"){
console.log("Amount of wife = " + a/8)
c = c*2;
f= c + d;
e = a - a/8
g = e/f
console.log("amount of boys =" + g*2 )
console.log("amount of girls =" + g )
}
else{
console.log("Wife is dead ")
c =c*2;
f = c + d;
g = a/f;
console.log("amount of boys =" + g*2 )
console.log("amount of girls =" + g )
}
</script>
</body>
</html>