MilkyWay

63

671.DDD #include<iostream> using namespace std; int main() { int a; cin>>a; if(a==61) cout<<"Brasilia"<<endl; else if(a==71) cout<<"Salvador"<<endl; else if(a==11) cout<<"Sao Paulo"<<endl; else if(a==21) cout<<"Rio de Janeiro"<<endl; else if(a==32) cout<<"Juiz de Fora"<<endl; else if(a==19) cout<<"Campinas"<<endl; else if(a==27) cout<<"Vitoria"<<endl; else if(a==31) cout<<"Belo Horizonte"<<endl; else cout<<"DDD nao cadastrado"<<endl; }

667.游戏时间 #include<iostream> using namespace std; int main() { int a,b; cin>>a>>b; if(a==b) cout<<"O JOGO DUROU 24 HORA(S)"<<endl; else { if(a>b) printf("O JOGO DUROU %d HORA(S)",(24-a)+b); else printf("O JOGO DUROU %d HORA(S)",b-a); } return 0; }

659.区间 #include<iostream> using namespace std; int main() { float a; cin>>a; if(a>=0 && a<=100) { if(a>=0 && a<=25) cout<<"Intervalo [0,25]"<<endl; else{ if(a>25 && a<=50) cout<<"Intervalo (25,50]"<<endl; else{ if(a>50 && a<=75) cout<<"Intervalo (50,75]"<<endl; else{ if(a>75 &&a<=100) cout<<"Intervalo (75,100]"<<endl; } } } } else cout<<"Fora de intervalo"<<endl; return 0; }

MilkyWay
13天前

# include [HTML_REMOVED]

using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a%b==0||b%a==0) cout<<”Sao Multiplos”<<endl;
else cout<<”Nao sao Multiplos”<<endl;
return 0;
}