标签:des style blog io color ar sp 数据 div
1 #include <stdio.h> 2 #include <math.h> 3 4 int main(){ 5 double amount; 6 double price; 7 double sum; 8 char s[20]; 9 10 sum=0; 11 while((scanf("%s%lf%lf",s,&amount,&price))!=EOF){ 12 sum+=(amount*price); 13 } 14 15 sum=floor(sum*10+0.5); 16 17 printf("%.1lf\n",sum/10); 18 19 20 21 return 0; 22 }
标签:des style blog io color ar sp 数据 div
原文地址:http://www.cnblogs.com/zqxLonely/p/4054855.html