灯带正确安装位置图解:关于VC++6.0的问题~急!

来源:百度文库 编辑:高考问答 时间:2024/05/02 02:43:24
问题是这样的 统计会员10,11,12月份的总消费超过10000将返给会员消费总量的百分之五否则有任何一个单月消费超过5000元将返还200元,否则只对会员表示感谢. 求个正确的标准的用VC++6.0的答案.

#include "stdafx.h"
#include <iostream.h>

int main(int argc, char* argv[])
{
float mall,m10,m11,m12,retu;
cout<<"Enter the money of 10:";
cin>>m10;
cout<<"Enter the money of 11:";
cin>>m11;
cout<<"Enter the money of 12:";
cin>>m12;
mall=m10+m11+m12;
if (mall>10000) retu=mall*0.05;
else if ((m10>5000)||(m11>5000)||(m12>5000)) retu=200;
else retu=0;
cout<<"The return is "<<retu<<endl;
cin.get();
cin.get();
return 0;
}

vc++6.0编译通过