【NEEPU OJ】1018--Alice’s discount

描述

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;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值