-
Notifications
You must be signed in to change notification settings - Fork 0
/
index-chp12to13.html
119 lines (86 loc) · 2.77 KB
/
index-chp12to13.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!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>12 to 13</title>
</head>
<body>
<script>
// // question 1
var a = prompt("what is your favourite fruite")
if (a == "apple" || "mango " || "banana") {
var b = prompt("how many kg")
if (b == "1kg" || "2kg")
alert("avcailable");
} else {
alert("unavailable")
}
// // question 1 end
// // / question 2
var num = prompt("enter your number")
var num2 = prompt("type your number")
if (num > num2) {
alert("enter your no is larger" + num)
} else if (num2 > num) {
alert("your largr no is" + num2)
} else {
alert("your no is success")
}
// // question 2 end
// // question 3
var integer = prompt("type your number to check is positive or negative")
if (integer < 5) {
alert(false)
} else if (integer > 5) {
alert(true)
} else {
alert(" the no is zero")
}
// // question 3 end\
// // question 4
var vovel = prompt("written a vovel letter")
if (vovel == "a" || vovel == "i" || vovel == "o" || vovel == "u" || vovel == "e") {
alert("this vovel word is applied")
}
else {
alert("the vovel word is not applied")
}
// question 4 end
// question 5
var password = " 03128760008"
var user = prompt("password")
if (user == 3128760008) {
alert("correct password");
}
var user = prompt("password")
if (user == 3128760008) {
alert("correct password");
} else {
alert("incorrect password")
}
// question 5 end
// question 6
var hour = prompt("please enter your days timing")
if (hour > 18) {
alert("good morning");
} else if (hour > 15) { alert("good day") }
else {
alert("good evening")
}
// question no 6 end
// question 7
var time = prompt("please enter your correct timing")
if (time >= 1900) {
alert("good morning")
} else if (time > 1500 && time < 1600) { alert("good day") }
else if (time > 1200 && time < 1300) {
alert("good afternone")
} else {
alert("good evening")
}
// question no 7 end
</script>
</body>
</html>