#include<iostream>
#include<cmath>
using namespace std;
int main()
{
float a, b, total1,total2;
cout << "请输入苹果的单价:" << endl;
cin >> a;
cout << "请输入购买苹果的数量:" << endl;
cin >> b;
total1 = a * b;
total2 = round(total1);
cout << "总价的整数部分为:" << int(total1) << endl;
cout << "总价四舍五入后的整数部分为:" << total2 << endl;
system("pause");
return 0;
}