pay_test.cpp
来自「c语言教程源码」· C++ 代码 · 共 20 行
CPP
20 行
#include <iostream.h>
float Hours_worked, Pay_Rate, Pay;
void main()
{
cout << "enter the hours worked: ";
cin >> Hours_worked;
cout << endl << "enter the pay rate: ";
cin >> Pay_Rate;
cout << endl << endl;
if (Hours_worked <= 40)
Pay = Hours_worked * Pay_Rate
else
Pay = 40 * Pay_Rate + Hours_worked - 40 * 1.5 * Pay_Rate;
cout << "The gross pay is: Pay" << endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?