This repository has been archived on 2019-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
s4-c/TP1/E4.c

20 lines
288 B
C

/* Programme qui lit et affiche les caractères */
#include <stdio.h>
#include <math.h>
struct Complex {
double a;
double b;
};
int main() {
double n, s = 0, k;
printf("Saisissez N\n");
scanf("%lf", &n);
for (k = 1; k <= n; k++) {
s += 1/k;
}
printf("%lf\n", s);
return 0;
}