C语言计算1+1/2+1/3++++1/50的代码
C语言计算1+1/2+1/3++++1/50的代码
日期:2021-11-03 07:50:48 人气:1
/*
1 + 1/2 + 1/3 + ...... + 1/50 = 4.499205
Press any key to continue
*/
#include<stdio.h>
int main(void) {
double i = 1,sum = 0;
while(i <=&n
C语言计算1+1/2+1/3++++1/50的代码
/*
1 + 1/2 + 1/3 + ...... + 1/50 = 4.499205
Press any key to continue
*/
#include<stdio.h>
int main(void) {
double i = 1,sum = 0;
while(i <=&n