第1个回答 2010-10-10
刚写的。。自己看看吧。。希望可以帮到你。。。
#include <iostream>
#include <string>
using namespace std;
int main()
{
string name_of_months[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int n;
cin >> n;
cout << name_of_months[n-1]<< endl;
return 0;
}
第2个回答 2010-10-10
#include <iostream>
#include <string>
using namespace std;
int main()
{
string name_of_months[12] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
int n;
cin >> n;
cout << name_of_months[n+1] << endl;
return 0;
}本回答被提问者采纳