标签:turn for pre crt ble print cpp scan double
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> int main() { int a, b, c; scanf("%d%d%d", &a, &b, &c); int relust_a = 0; int relust_b = 0; double relust_c = 0; for (int i = 1; i <= a; i++) { relust_a += i; } for (int i = 1; i <= b; i++) { relust_b += i*i; } for (int i = 1; i <= c; i++) { relust_c = relust_c+((double)1 / i); } printf("%.2f\n", (double)(relust_a + relust_b + relust_c)); return 0; }
标签:turn for pre crt ble print cpp scan double
原文地址:https://www.cnblogs.com/shenji/p/12455105.html