Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- long long i, n;
- float tong = 1;
- scanf("%lld", &n);
- for (i = 2; i<=n ; ++i){
- tong = (tong + ((float)1)/i);
- }
- printf("%.4lf", tong);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement