中国在日留学生一周兼职所得工资以及工资兑换人民币的简单计算
#include
int main() { const int XS = 40, GZ = 900, BZ = 5000; int hour = 0; double pay = 0; printf("本周您工作时长为(小时) "); printf("注:若工作4小时以上但未满5小时按4小时计算,一周工作时间大于等于40小时会发放补助 "); scanf_s("%d", &hour); if (hour >= XS) pay = XS * GZ + (hour - XS) * GZ * 1.25 + BZ; else pay = hour * GZ; printf("本周支付您工资为%f日元 ", pay); printf("注:本店提供日元换取人民币服务,但需收取手续费 "); printf("截至当日,人民币与日币的的汇率约为1:19 "); printf("若需兑换,手续费按换取金额的0.004收费 "); printf("若不需兑换,请输入0,若需换取,请输入换取的人民币金额为: "); double price = 0, price1 = 0; scanf_s("%lf", &price); price1 = price * 19; if (price1 > pay) printf("对不起,您的本周工资不足兑换您选择兑换的人民币 "); else printf("换取人民币后本周支付您%f日元,%f人民币 ", pay - price1, price); return 0; }
版权声明: 本站仅提供信息存储空间服务,旨在传递更多信息,不拥有所有权,不承担相关法律责任,不代表本网赞同其观点和对其真实性负责。如因作品内容、版权和其它问题需要同本网联系的,请发送邮件至 举报,一经查实,本站将立刻删除。