#include<iostream>
#include"Sales_item.h"
using namespace std;
int main()
{
Sales_item total;
if (cin >> total)
{
Sales_item trans;
while (cin >> trans)
{
if (trans.isbn == total.isbn)
total += trans;
else
{
cout << total << endl;
total = trans;
}
}
cout << total << endl;
}
else
{
cerr << "No data!" << endl;//输出警告和错误信息
}
return 0;
}
1.22
最新推荐文章于 2024-06-12 16:21:25 发布