fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <iostream>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. double arr[101];
  9. double asd=0;
  10. for (int i=1;i<=100;i++)
  11. {
  12. arr[i]=1/pow(i, 2);
  13. asd+=arr[i];
  14. }
  15. cout<<asd<<endl;
  16. return 0;
  17. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
1.63498