📄 pay.cpp
字号:
#include <iostream.h>
float hours_worked, pay_rate, week_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)
week_pay = hours_worked * pay_rate;
else
week_pay = 40 * pay_rate + (hours_worked - 40) * 1.5 * pay_rate;
cout << "The weekly pay is " << week_pay << endl;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -