题解
2024-12-28 16:48:32
发布于:江苏
21阅读
0回复
0点赞
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
if(n<=770&&n>=622){
cout<<"red";
}else if(n>=597&&n<=621){
cout<<"orange";
}else if(n>=577&&n<=596){
cout<<"yellow";
}else if(n>=492&&n<=576){
cout<<"green";
}else if(n>=455&&n<=491){
cout<<"blue";
}else if(n>=350&&n<=454){
cout<<"purple";
}else{
cout<<"invisible light";
}
return 0;
}
这里空空如也
有帮助,赞一个