LeeBlog

导航

HDU 2090 算菜价

代码
#include <stdio.h>
int main ( )
{
double sum = 0,unit,count;
char s[1000];
while ( scanf ( "%s%lf%lf" , s, &count,&unit ) != EOF )
sum
+= count * unit ;
printf (
"%.1lf\n" , sum );
return 0;
}

 

posted on 2011-01-29 16:18  LeeBlog  阅读(291)  评论(0编辑  收藏  举报