Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C by wolf ( 15 years ago )
#include <stdio.h>
int main()
{
int x;
printf("Bitte geben Sie eine Zahl ein\n");
scanf("%d", &x);
printf("Ihr Exponent ist %d\n", expo(x));
return 0;
}
float expo(int x)
{
int n,z,fak;
float sum,exp;
z=x;
fak=1;
sum=1+x;
for(n=1;n<=x;n++)
{
fak=fak*n;
z=z*x;
exp=z/fak;
sum=sum+exp;
if(exp<0.0001)
{
break;
}
}
return sum;
}
Revise this Paste