#include<stdio.h>
int main()
{
int n,k;
double s, i,j;
scanf_s("%d", &k);
s = 0;
i = 1.0;
n = 1;
while (n>k)
j=i/ n;
s += j;
i = -i;
n++;
}
printf("s=%f", s);
while (1);
你是要求什么