题目要求:
超市苹果3.5元/斤,香蕉4.2元/斤,编写一个程序,用户从键盘输入购买苹果和香蕉的重量(单位:斤),计算应付款总额,输入实收现金,计算找回金额,最后输出如下图的购物清单。
我的答案:
#include<iostream>
using namespace std;
int main()
{
double weightofA,weightofB,all,priceofA,priceofB;
int income;
cout<<"*******************************************"<<endl;
cout<<"* *"<<endl;
cout<<"*