AcWing 671. DDD
原题链接
简单
作者:
yoruichi
,
2021-02-16 23:54:47
,
所有人可见
,
阅读 296
#include <iostream>
int main()
{
int DDD;
std::cin>>DDD;
switch (DDD)
{
case 61: //注意case的形式,int类型和char类型不同
printf("Brasilia\n");
break;
case 71:
printf("Salvador\n");
break;
case 11:
printf("Sao Paulo\n");
break;
case 21:
printf("Rio de Janeiro\n");
break;
case 32:
printf("Juiz de Fora");
break;
case 19:
printf("Campinas\n");
break;
case 27:
printf("Vitoria\n");
break;
case 31:
printf("Belo Horizonte");
break;
default:
printf("DDD nao cadastrado");
break;
}
return 0;
}