Here is the new version which prints the results into a file:
Code:
#include <stdio.h>
#include <conio.h>
#include <fstream.h>
#include <time.h>
void main ()
{
long int v[259000];
int i,n;
double start;
ofstream fp_out;
fp_out.open("result.txt", ios::out);
v[0]=1;
for(i=1;i<259000;i++) v[i]=0;
printf("Enter the number: ");
scanf("%d",&n); clrscr ();
printf("-_-_- :L:O:A:D:I:N:G: -_-_-");
if(n==0 || n==1 ) fp_out<<n<<"!= "<<"1";
else
{
start = clock ();
long int c=0;
for(i=1;i<=n;i++)
{
long int j;
for(j=0;j<=c;j++)
v[j]*=i;
for(j=0;j<=c;j++)
{
if(v[j]>=10)
{
v[j+1]=v[j+1]+v[j]/10;
v[j]=v[j]%10;
int k1=258999,cont=0;
while(v[k1]==0) { cont++; k1--; }
c=258999-cont;
}
}
fp_out<<i<<"!= ";
for(j=c;j>=0;j--)
fp_out<<v[j];
fp_out<<endl;
}
start=clock()-start;
clrscr ();
printf("-_-_- :C:O:M:P:L:E:T:E:D: -_-_- \n Check out the result file! \n It took %f ",start);printf(" seconds to complete. ");
}
getch ();
fp_out.close();
}

it's calculating ... as you can see ..