Untitled
public text v1 · immutable #include <conio.h>
#include <stdio.h>
#include <math.h>
int main(void)
{
int i=1,k=1, cheslo=0;
float s=0;
printf("enter values: ");
scanf("%d", &cheslo);
if(cheslo==0) i++;
while(cheslo){ i+=1; cheslo=cheslo/10;
k=i-1;
while(k)
{
s=s+1/pow(k,2);
k--;
}
} i--;
printf("\ni=%d", i);
printf("\ns=%f", s);
getch();
return 0;
}