--- title: "03-区间" created: 2025-12-02 tags: - 项目 aliases: - 区间 --- # 区间 ## 题目 [区间](https://www.acwing.com/problem/content/661/) ![[image-0db0a3d8.png]] ## 思路分析 ## 代码实现 ```java import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); double x=sc.nextDouble(); String res; if(x<0 || x>100) res="Fora de intervalo"; else if(x<=25) res="Intervalo [0,25]"; else if(x<=50) res="Intervalo (25,50]"; else if(x<=75) res="Intervalo (50,75]"; else res="Intervalo (75,100]"; System.out.print(res); } } ``` ## 同类题型 ## 视频讲解 --- **项目分区导航**: [[02-动物|动物]] ⬅️ | 03-区间 | ➡️ [[04-游戏时间|游戏时间]]