楼上的程序有问题啊~
以下是引用lb92733在2006-7-16 23:30:13的发言:
大哥你给帮帮忙吧!!
/* Note:Your choice is C IDE */
#include "stdio.h"
main()
{int i,j,k,h,l,m,n,o,p,q,r,s;
static double sum,b,t,a[4][12]={0.278,0.287,0.284,0.305,0.361,0.249,0.266,0.306,0.252,0.338,0.452,0.175,0.322,0.327,0.332,0.339,0.361,0.313,0.315,0.358,0.312,0.363,0.374,0.279,0.25,0.253,0.246,0.245,0.197,0.276,0.253,0.235,0.272,0.208,0.118,0.268,0.151,0.133,0.138,0.11,0.081,0.162,0.166,0.102,0.164,0.092,0.056,0.278};
t=1.1817E-6,sum=0;
for(i=0;i<4;i++)
for(j=0;j<4;j++)
for(k=0;k<4;k++)
for(h=0;h<4;h++)
for(l=0;l<4;l++)
for(m=0;m<4;m++)
for(n=0;n<4;n++)
for(o=0;o<4;o++)
for(p=0;p<4;p++)
for(q=0;q<4;q++)
for(r=0;r<4;r++)
for(s=0;s<4;s++)
{b=a[i][0]*a[j][1]*a[k][2]*a[h][3]*a[l][4]*a[m][5]*a[n][6]*a[o][7]*a[p][8]*a[q][9]*a[r][10]*a[s][11];
if (b>=t) printf("%d%d%d%d%d%d%d%d%d%d%d%d\n ",i,j,k,h,l,m,n,o,p,q,r,s);
}
}
我的程序运行的结果怎样保存到一个文件里,我实在不会谢谢
大哥你给帮帮忙吧!!
/* Note:Your choice is C IDE */
#include "stdio.h"
main()
{int i,j,k,h,l,m,n,o,p,q,r,s;
static double sum,b,t,a[4][12]={0.278,0.287,0.284,0.305,0.361,0.249,0.266,0.306,0.252,0.338,0.452,0.175,0.322,0.327,0.332,0.339,0.361,0.313,0.315,0.358,0.312,0.363,0.374,0.279,0.25,0.253,0.246,0.245,0.197,0.276,0.253,0.235,0.272,0.208,0.118,0.268,0.151,0.133,0.138,0.11,0.081,0.162,0.166,0.102,0.164,0.092,0.056,0.278};
t=1.1817E-6,sum=0;
for(i=0;i<4;i++)
for(j=0;j<4;j++)
for(k=0;k<4;k++)
for(h=0;h<4;h++)
for(l=0;l<4;l++)
for(m=0;m<4;m++)
for(n=0;n<4;n++)
for(o=0;o<4;o++)
for(p=0;p<4;p++)
for(q=0;q<4;q++)
for(r=0;r<4;r++)
for(s=0;s<4;s++)
{b=a[i][0]*a[j][1]*a[k][2]*a[h][3]*a[l][4]*a[m][5]*a[n][6]*a[o][7]*a[p][8]*a[q][9]*a[r][10]*a[s][11];
if (b>=t) printf("%d%d%d%d%d%d%d%d%d%d%d%d\n ",i,j,k,h,l,m,n,o,p,q,r,s);
}
}
我的程序运行的结果怎样保存到一个文件里,我实在不会谢谢
我想:应该 用文件。保存。
不过,我文件我现在正在学。