Advertisement
PROFESSOR_AIH

S Sequence

Apr 10th, 2022
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.17 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int i;
  5.     double sum=0;
  6.     for(i=1; i<=100; i++)
  7.     {
  8.         sum=sum+(1.0/i);
  9.     }
  10.     printf("%.2lf\n",sum);
  11.     return 0;
  12. }
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement