#include<iostream>
#include<string>
int main()
{
using namespace std;
string Months[12] =
{
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"Octorber",
"November",
"December"
};
int sell[12];
int total = 0;
for(int i = 0;i < 12;i++)
{
cout << "Please enter the book you sold in " << Months[i] << ":";
cin >> sell[i];
total += sell[i];
}
cout << "The total number of the book you sold in this year is:" << total << endl;
return 0;
}
Exercise 5.4
最新推荐文章于 2025-02-10 20:24:30 发布