ABC 公司的经理计划使用一个计算机系统,该系统要求用户输入支付土地税单的金额和日期。 如果输入的任何日期逾期,则用户必须额外支付 CNY 10.00 作为复合费用。 计费金额将添加到复合值中。 然后,显示实际计费金额,系统将终止。 否则,显示原始计费金额,系统将终止。
#include< iostream>
using namespace std;
int main()
{
int t = 150;
int day = 0;
cout << " 交税年月是2020年2月" << endl;
cout << " 请输入交税日期: " << endl;
cin >> day ;
cout << " 您是在 " << day << "号交的税 "<<endl;
if(day<=3 ) //if 后面是不是只能跟范围
{
cout << " 账单金额:: 150" << endl;
cout << " 支付日期 : 02 / 02 / 20" << endl;
cout << " 截止日期 : 03 / 02 / 20" << endl;
cout << " 实际缴纳金额: "<< t << endl;
}
else
{
cout << " 账单金额 : 150" << endl;
cout << " 支付日期 : 04 / 02 / 20" << endl;
cout << " 截止日期: 03 / 02 / 20" << endl;
cout << " 实际缴纳金额 : " << t+10 <<endl;
}
system("pause");
return 0;
}
#include< iostream>
using namespace std;
int main()
{
int t = 150;
int day = 0;
cout << " 交税年月是2020年2月" << endl;
cout << " 请输入交税日期: " << endl;
cin >> day ;
cout << " 您是在 " << day << "号交的税 "<<endl;
if(day>3 )
{
t = t+10;
}
cout << " 账单金额:: 150" << endl;
cout << " 支付日期 : 02 / 02 / 20" << endl;
cout << " 截止日期 : 03 / 02 / 20" << endl;
cout << " 实际缴纳金额: "<< t << endl;
system("pause");
return 0;