以下是使用C语言计算1到95的平方根之和并保留两位小数的程序: ```c #include <stdio.h> #include <math.h> int main() { double sum = 0; for (int i = 1; i <= 95; i++) { sum += sqrt(i); } printf("The sum of the square roots from 1 to 95 is %.2f ", sum); return 0; } ``` 在这段代码中,我们首先定义了一个变量`sum`来存储平方根之和。然后,我们使用一个for循环从1遍历到95,每次迭代中,我们都将当前数字的平方根加到`sum`上。我们使用`printf`函数输出结果,其中`%.2f`表示保留两位小数。 [2024-06-19 17:59:33 | AI写代码神器 | 199点数解答]