Skip to content

Commit

Permalink
Solve Interval in c
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Jul 24, 2024
1 parent edfeccb commit 2db7495
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions solutions/beecrowd/1037/1037.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <stdio.h>

int main() {
double n;

while (scanf("%lf", &n) != EOF) {
if (n >= 0.0 && n <= 25.0) {
printf("Intervalo [0,25]\n");
} else if (n > 25.0 && n <= 50.0) {
printf("Intervalo (25,50]\n");
} else if (n > 50.0 && n <= 75.0) {
printf("Intervalo (50,75]\n");
} else if (n > 75.0 && n <= 100.0) {
printf("Intervalo (75,100]\n");
} else {
printf("Fora de intervalo\n");
}
}

return 0;
}

0 comments on commit 2db7495

Please sign in to comment.