#include"iostream"
using namespace std;
static int weight=0;
void buy()
{
int in_temp;
cout<<"买入重量: ";
cin>>in_temp;
weight+=in_temp;
}
void sell()
{
int out_temp;
cout<<"卖出重量: ";
cin>>out_temp;
weight-=out_temp;
}
void main()
{
char ch;
while(1)
{
cout<<" 1.买入货物重量"<
cin>>ch;
switch(ch)
{
case'1':{buy(); break;};
case'2':{sell();break;};
case'3':{cout<<"剩余重量为: "<
}
}
}