哪位大神来帮我把保存文件弄好啊 真的很急~~
求各位帮帮我把这个程序得到的结果保存到输出保存到outfile.txt文件中
各位帮忙把程序改动一下~真的很急。现在也没时间看文件的章节了,反正是举手之劳请各位高抬贵手吧
最好 改动了然后把全体粘贴出来,跪谢。。
#include<stdio.h>
int score[4][4],choose;
void fun()
{ int i,j,k,who;
score[1][1]=7;
score[2][1]=8;
score[3][1]=9;
for(i=1;i<=3;i++)
for(j=1;j<=3;j++)
for(k=1;i!=j&&k<=3;k++)
if(k!=i&&k!=j&&15-i-score[1][1]!=15-j-score[2][1]
&&15-i-score[1][1]!=15-k-score[3][1]
&&15-j-score[2][1]!=15-k-score[3][1]
&&15-i-score[1][1]!=i+1
&&15-j-score[2][1]!=j+1
&&15-k-score[2][1]!=k+1)
{
score[1][2]=i;score[1][3]=15-i-7;
score[2][2]=j;score[2][3]=15-j-8;
score[3][2]=k;score[3][3]=15-k-9;
}
for(who=0,i=1;i<=3;i++,printf("\n"))
for(j=1;j<=3;j++)
{
printf("%d",score[i][j]);
if(score[i][j]==1)who=i;
}
if(who==1)
printf("The last one arrived to end is a child from family Zhang.\n");
else if(who==2)
printf("The last one arrived to end is a child from family Wang.\n");
else printf("The last one arrived to end is a child from family Li.\n");
}
void main()
{
printf("welcome to my design !my c is who runs the least fast \n");
printf("if you want to go the program without thinking ,please put into 1\n");
printf("if you wan to go over slightly, please put into 2\n ");
scanf("%d",&choose);
switch(choose)
{
case 1:
{ fun();break;
}
case 2:printf("the program is over, thank you for your fitting\n");
default:break;
}
}
各位帮忙把程序改动一下~真的很急。现在也没时间看文件的章节了,反正是举手之劳请各位高抬贵手吧
最好 改动了然后把全体粘贴出来,跪谢。。
#include<stdio.h>
int score[4][4],choose;
void fun()
{ int i,j,k,who;
score[1][1]=7;
score[2][1]=8;
score[3][1]=9;
for(i=1;i<=3;i++)
for(j=1;j<=3;j++)
for(k=1;i!=j&&k<=3;k++)
if(k!=i&&k!=j&&15-i-score[1][1]!=15-j-score[2][1]
&&15-i-score[1][1]!=15-k-score[3][1]
&&15-j-score[2][1]!=15-k-score[3][1]
&&15-i-score[1][1]!=i+1
&&15-j-score[2][1]!=j+1
&&15-k-score[2][1]!=k+1)
{
score[1][2]=i;score[1][3]=15-i-7;
score[2][2]=j;score[2][3]=15-j-8;
score[3][2]=k;score[3][3]=15-k-9;
}
for(who=0,i=1;i<=3;i++,printf("\n"))
for(j=1;j<=3;j++)
{
printf("%d",score[i][j]);
if(score[i][j]==1)who=i;
}
if(who==1)
printf("The last one arrived to end is a child from family Zhang.\n");
else if(who==2)
printf("The last one arrived to end is a child from family Wang.\n");
else printf("The last one arrived to end is a child from family Li.\n");
}
void main()
{
printf("welcome to my design !my c is who runs the least fast \n");
printf("if you want to go the program without thinking ,please put into 1\n");
printf("if you wan to go over slightly, please put into 2\n ");
scanf("%d",&choose);
switch(choose)
{
case 1:
{ fun();break;
}
case 2:printf("the program is over, thank you for your fitting\n");
default:break;
}
}
...全文
相关推荐
matlab图片批量预处理并保存为mat数据和jpg文件
matlab图片批量预处理并保存为mat数据和jpg文件。~~预处理中的代码可以替换成其他方式,这里只是做个引导。批处理的文件夹以及图片的格式请根据实际情况自行调整。
lua5.3的动态库 已经弄好了可以直接使用
lua5.3的动态库 已经弄好了可以直接使用比网络上找的库靠谱多了
Ghost 编译教程
呼呼~~不容易啊,居然弄好了视频(再次感谢下软件制作者,稳定性真的没话说)直接来教程~~烂了点,大家海涵~~~不懂的问我吧~~ 我说怎么上传了两次都没有附件呢,原来大小有限制的啊 ,那我直接给链接好了
lua5.4的动态库 已经弄好了可以直接使用
lua5.4的动态库 已经弄好了可以直接使用已经测试过来完全可以使用比其他地方下的靠谱多了
一个flash的色斑源文件~~
一个flash的色斑源文件~~一个flash的色斑源文件~~一个flash的色斑源文件~~


