p.s this is not my homework, I am just practicising some programming for my test, would be glad to get some help!!
#include <stdio.h>
int main(void)
{double term,den,sum,n,x;
for(sum=0.0,n=0.0;term>0.001;n++)
{
if(n==0.0||n==1.0)
{x=1.0;}
else
{
x*= n;
}
term=1/x;
sum+=term;
}
printf("%lf",sum);
return 0;
}

New Topic/Question
Reply



MultiQuote





|