Ok, I was searching for a program that can computer pi, well hey brain-**** can do it, C should be able to do it also!
I found this POS
Code:
#include <stdio.h>
int a=10000,b,c=2800,d,e,f[2801],g;
int main(){
for(;b-c;)
f[b++]=a/5;
for( ; d=0, g=c*2; c-=14 ,printf("%.4d",e+d/a) ,e=d%a)
for(b=c;d+=f[b]*a,f[b]=d%--g,d/=g--,--b;d*=b);
return 0;
}
I made some modifications such as #include <stdio.h>!
but the for loops make no sense!
for(; <--- WHERE IS THE FIRST VALUE!?
anyway, if someone could explain what is going on in this program it would be nice. But if you can help me find a better program for calculating pi, that would be better.
oh, and without the use of math.h's global PI
thank you.
--------
3.14159265358979323...