杭电 hdu 2090

算菜价:

#include <cstdio>
using namespace std;
int main()
{
    double num, price;
    char s[20];
    double sum = 0;
    while(scanf("%s %lf %lf", s, &num, &price) != EOF)
    {
             sum += num * price;                          
    }
    printf("%.1lf\n", sum);
    return 0;   
}


你可能感兴趣的:(ACM,HDU,杭电,2090)