Skip to content

Commit

Permalink
1155 C
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPLopes committed Dec 19, 2019
1 parent fa0e796 commit 4e8474f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions C/1155.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include<stdio.h>

double seq(){
double s = 1;
for (size_t i = 2; i <=100; i++)
{
s += 1.0/i;
}
return s;
}

int main(){

printf("%.2lf\n",seq());
return 0;
}

0 comments on commit 4e8474f

Please sign in to comment.