AcWing 671. DDD
原题链接
简单
作者:
fengyutong
,
2024-11-10 17:19:44
,
所有人可见
,
阅读 2
if else连写
#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;
return 0;
}