标签:sam for const turn 教程 scan 设计 color ...
100 50 10
47977.93
1 int main(int argc, char const *argv[]) 2 { 3 4 int a, b, c, i; 5 float s1 = 0, s2 = 0, s3 = 0; 6 7 scanf("%d%d%d", &a, &b, &c); 8 9 for(i = 1; i <= a; i++) 10 { 11 s1 += i; 12 } 13 14 for(i = 1; i <= b; i++) 15 { 16 s2 += i * i; 17 } 18 19 for(i = 1; i <= c; i++) 20 { 21 s3 += 1.0 / i; 22 } 23 24 25 printf("%.2f\n", s1+s2+s3); 26 return 0; 27 }
标签:sam for const turn 教程 scan 设计 color ...
原文地址:http://www.cnblogs.com/hello-lijj/p/7827796.html