HDU 2090 算菜价 --- 水题

HDU 2090 算菜价

/* HDU 2090 算菜价 --- 水题 */
#include <cstdio>

int main()
{
    char s[105];
    double a, b, sum = 0;

    while (scanf("%s", s)==1){
        scanf("%lf%lf", &a, &b);
        a *= b;
        sum += a;
    }
    printf("%.1f
", sum);

    return 0;
}
View Code
原文地址:https://www.cnblogs.com/tommychok/p/5065443.html