文章目录
- AcWing 659. 区间
- AC代码
AcWing 659. 区间
本题链接:AcWing 659. 区间
本博客给出本题截图:
AC代码
代码:
#include <iostream> using namespace std; int main() { float a; cin >> a; if(a < 0 || a > 100) cout << "Fora de intervalo"; else if (a >= 0 && a <= 25) cout << "Intervalo [0,25]"; else if ( a > 25 && a <= 50) cout << "Intervalo (25,50]"; else if ( a > 50 && a <= 75) cout << "Intervalo (50,75]"; else cout << "Intervalo (75,100]"; return 0; }