ex66104.cpp
来源:互联网 发布:防范网络电信诈骗 编辑:程序博客网 时间:2024/06/05 17:46
/**************************************************************************
PURPOSE: Compute salary
TIME: 08/10/25 18:24
AUTHOR: ch8_daniel
INPUT: hour --------- working hours per week
salary -------- salary per hour
OUTPUT: week_salary -------- salary for one week
VERSION: 1.0
**************************************************************************/
#include <iostream>
using namespace std;
int main()
{
float hours;
float salary;
float week_salary;
const float h = 40; // h is the separate line
cout << "How many <hours> do you work a week ?";
cin >> hours;
cout << "And What's the salary per hour? ";
cin >> salary;
if (hours < h)
{
week_salary = salary * hours;
}
else
{
week_salary = salary * h + salary * (1.5) * (hours - h);
}
cout << "/n>>Your week-salary is " << week_salary << endl;
return 0;
}
PURPOSE: Compute salary
TIME: 08/10/25 18:24
AUTHOR: ch8_daniel
INPUT: hour --------- working hours per week
salary -------- salary per hour
OUTPUT: week_salary -------- salary for one week
VERSION: 1.0
**************************************************************************/
#include <iostream>
using namespace std;
int main()
{
float hours;
float salary;
float week_salary;
const float h = 40; // h is the separate line
cout << "How many <hours> do you work a week ?";
cin >> hours;
cout << "And What's the salary per hour? ";
cin >> salary;
if (hours < h)
{
week_salary = salary * hours;
}
else
{
week_salary = salary * h + salary * (1.5) * (hours - h);
}
cout << "/n>>Your week-salary is " << week_salary << endl;
return 0;
}
- ex66104.cpp
- cpp
- CPP
- CPP
- cpp
- cpp
- CPP
- CPP
- ClientSockThread.cpp&&ClientUrlThread.cpp
- cpp调用其他cpp
- ex34a.cpp&&ex34aDoc.cpp&&ex34aView.cpp
- MainFrm.cpp&&ServerThread.cpp&&SheetConfig.cpp
- CPP thread
- cpp->html
- CFaderWnd.cpp
- PasswordReminder.cpp
- object.cpp
- CmdTarget.cpp
- ex83135.cpp
- ex81113.cpp
- 在这里请教一个问题
- ex75122.cpp
- VS2005 SP1安装问题
- ex66104.cpp
- ex65104.cpp
- ex64104.cpp
- ex63104.cpp
- 堆的初识
- How_To_Build_WebKit_With_VS2005
- 黑屏-是保护我们的饭碗
- 爆笑口误 娱乐大家
- 从注册表切断一切黑客入侵的路径