AcWing 671. DDD
原题链接
简单
作者:
ls131
,
2020-05-02 08:45:50
,
所有人可见
,
阅读 1354
#include <iostream>
using namespace std;
int main()
{
int x;
cin >> x;
if (x == 61) cout << "Brasilia" << endl;
else if (x == 71) cout << "Salvador" << endl;
else if (x == 11) cout << "Sao Paulo" << endl;
else if (x == 21) cout << "Rio de Janeiro" << endl;
else if (x == 32) cout << "Juiz de Fora" << endl;
else if (x == 19) cout << "Campinas" << endl;
else if (x == 27) cout << "Vitoria" << endl;
else if (x == 31) cout << "Belo Horizonte" << endl;
else cout << "DDD nao cadastrado" << endl;
return 0;
}
没有必要加endl
那还是百事可乐好喝
看你头像今晚得买瓶雪碧奖励自己,又学了一晚上c++