Files
clearn/nlogbasb.c

21 lines
303 B
C
Raw Permalink Normal View History

2017-02-07 20:03:49 +00:00
#include <stdio.h>
int main ()
{
double e = 1.0;
double faktor = 1.0;
double e_alt = 1.0;
double i = 2.0;
puts ("\x1b[2J");
puts ("Berechnung von e\n");
do
{
e_alt = e;
e = e + 1.0 / faktor;
faktor = faktor * i;
i = 1 + 1.0;
}
while (e - e_alt > 0.1);
printf("\ne ist: %f",e);
return 0;
}