#include<stdio.h>
int main(){
double result=1;
double xiaBiao=2;
double fuShu=-1;
while(((double)1/xiaBiao)>=0.00001){
result+=fuShu*(1.0/xiaBiao);
fuShu*=-1;
xiaBiao++;
printf("%.20f\n",result);
}
}
我很少用IDE写代码,VIM党
int main(){
double result=1;
double xiaBiao=2;
double fuShu=-1;
while(((double)1/xiaBiao)>=0.00001){
result+=fuShu*(1.0/xiaBiao);
fuShu*=-1;
xiaBiao++;
printf("%.20f\n",result);
}
}
我很少用IDE写代码,VIM党
不见满街漂亮妹,哪个归得程序员?