算菜价
#include<stdio.h> int main( ) { char ch[100]; double a,b,sum=0; while(scanf("%s%lf%lf",ch,a,b)!=EOF) sum+=a*b; printf("%.2lf\n",sum); return 0; }
在编译器上是无法得结果的。直接提交。
posted on 2011-04-29 22:10 more think, more gains 阅读(187) 评论(0) 编辑 收藏 举报
#include<stdio.h> int main( ) { char ch[100]; double a,b,sum=0; while(scanf("%s%lf%lf",ch,a,b)!=EOF) sum+=a*b; printf("%.2lf\n",sum); return 0; }
在编译器上是无法得结果的。直接提交。
posted on 2011-04-29 22:10 more think, more gains 阅读(187) 评论(0) 编辑 收藏 举报