-
Notifications
You must be signed in to change notification settings - Fork 0
/
arraytwo.html
114 lines (100 loc) · 2.69 KB
/
arraytwo.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
<!DOCTYPE html>
<html>
<head>
<title>EVEN OR ODD</title>
<style>
/* main container */
.main-Container {
background-color: #824D74;
background-color: rgba(118, 38, 155, 0.7);
box-shadow: 0px 0px 44px red;
height: 600px;
width: 550px;
margin-left: 25%;
padding: 10px;
border-radius: 20%;
}
/* display */
.display-Text {
background-color: #3d27b6;
height: 200px;
width: 500px;
border-radius: 20px;
margin: 25px;
display: grid;
justify-content: center;
align-items: center;
font-size: 40px;
font-weight: bold;
margin-top: 40PX;
}
/* center */
.center-box {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
/* input */
input {
background-color: #AD88C6;
height: 50px;
width: 400px;
font-size: 30px;
margin: 10px;
margin-top: 20px;
}
/* button */
button {
background-color: #6420AA;
height: 60px;
width: 400px;
margin: 10px;
font-size: 20px;
font-weight: bold;
border-radius: 20px;
}
p{
font-size: 30px;
font-weight: bold;
text-align: center;
}
</style>
<script>
function displayText() {
// input 5 number
let inputs = [];
for(i=0; i<3; i++){
inputs[i]= prompt("ENTER THE VALUE"+ i + "index= ");
}
// output in reverce order
// for(x=2; x>=0; x--){
// console.log("THE OUTPUT IS", inputs[x])
// }
// while loop
let x = 2;
while(x >= 0){
console.log("THE OUTPUT IS", inputs[x]);
x--;
}
}
</script>
</head>
<body>
<!-- main container -->
<div class="main-Container">
<!-- HEADING -->
<P>Even Or Odd</P>
<!-- display -->
<div class="display-Text" id="display"></div>
<!-- input button -->
<div class="center-box">
<input id="inputOne" type="number" value="" />
<!-- click button -->
<button onclick="displayText()">Even Or Odd</button>
<!-- clear button -->
<button onclick="clearFunction()">Clear Button</button>
</div>
</div>
</body>
</html>