/*
* Copyright (c) 2013, 烟台大学计算机学院
* All rights reserved.
* 作 者:曹昕卓
* 完成日期:2013 年10月16日
* 版 本 号:v1.0
* 问题描述:求工资
* 样例输入:55 45
* 样例输出:2612.5
* 问题分析:输入rate,hour,输出RMB
*/
#include <iostream>
using namespace std;
int main()
{
double rate,hour,RMB;
cout<<"Please enter the rate,hour"<<endl;
cin>>rate>>hour;
if(hour<40)
RMB=rate*hour;
else
RMB=40*rate+(hour-40)*1.5*rate;
cout<<"RMB="<<RMB<<endl;
return 0;
}
运行结果:
心得体会:I‘m very happy!很顺利完成。