-
Notifications
You must be signed in to change notification settings - Fork 0
/
1037.js
36 lines (33 loc) · 925 Bytes
/
1037.js
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
let input = require('fs').readFileSync('./dev/stdin/file.txt', 'utf8')
let lines = input.split('\n')
let entrada = parseFloat(lines.shift())
if (entrada >= 0 && entrada <= 25) {
console.log("Intervalo [0,25]")
}
else if (entrada > 25 && entrada <= 50) {
console.log("Intervalo (25,50]")
}
else if (entrada > 50 && entrada <= 75) {
console.log("Intervalo (50,75]")
}
else if (entrada > 75 && entrada <= 100) {
console.log("Intervalo (75,100]")
}
else {
console.log("Fora de intervalo")
}let entrada = parseFloat(lines.shift())
if (entrada >= 0 && entrada <= 25) {
console.log("Intervalo [0,25]")
}
else if (entrada > 25 && entrada <= 50) {
console.log("Intervalo (25,50]")
}
else if (entrada > 50 && entrada <= 75) {
console.log("Intervalo (50,75]")
}
else if (entrada > 75 && entrada <= 100) {
console.log("Intervalo (75,100]")
}
else {
console.log("Fora de intervalo")
}