描述
Almost to Alice’s holiday, Alice wants to go home. And this time, it’s on black Friday, so all tickets are discounted!
However, the price and discount rate for each ticket are different. So Alice would like to know the price of all tickets after discount. Can you help her?
输入
The input has multiple lines.Each line has 2 numbers A,B.A is in integer and B in double.
输出
The output has multiple lines.Each case has one line in only one number S, S in double.And you need to retain a decimal fraction.
输入样例 1
888 7.0
555 8.0
600 7.1
输出样例 1
621.6
444.0
426.0
提示
Don’t worry about rounding.Just to output it!
来源
NEEPU_ACM_2017_训练赛(1)
注意:
对于double类型,scanf用%lf,printf用%f即可
代码
#include <cstdio>
using namespace std;
int main(){
int a;
double res, b, aa;
while(~scanf("%d %lf", &a, &b)){
aa = a;
res = aa * b / 10;
printf("%.1f\n", res);
}
return 0;
}