11501: 【原1501】[Textbook]Ex2-4 工资问题
题目
题目描述
author: 翁惠玉 张億一 万诚 白毅伟 陈乐群 原OJ链接:https://acm.sjtu.edu.cn/OnlineJudge-old/problem/1501
Description
某工种按小时计算工资。每月劳动时间(小时)乘以每小时工资等于总工资。总工资扣除10%的公积金,剩余的为应发工资。
Input Format
输入两个数,分别为劳动时间和每小时工资
Output Format
输出总工资(空格)应发工资
Sample Input
1 1.5
Sample Output
1.5 1.35
ligongzzz's solution
#include <iostream>
using namespace std;
int main() {
double a, b;
cin >> a >> b;
cout << a * b << " " << a * b * 0.9;
return 0;
}
yyong119's solution
#include <iostream>
using namespace std;
int main() {
double a, b;
cin >> a >> b;
cout << a * b << " " << a * b * 0.9 << endl;
return 0;
}