20 lines
288 B
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;
|
|
}
|