Run ID:118414

提交时间:2025-04-29 21:59:16

#include <iostream> int main() { int a, x, y; // 输入数a和区间[x, y] std::cout << "请输入数a: "; std::cin >> a; std::cout << "请输入区间的起始值x: "; std::cin >> x; std::cout << "请输入区间的结束值y: "; std::cin >> y; // 判断a是否在区间[x, y]内 if (a >= x && a <= y) { std::cout << "yes"; } else { std::cout << "no"; } return 0; }