如何修改程序导出结果?例如导出结果到E盘,我用的C语言编程软件是wintc,谢谢!例如下面程序 5

#include"stdio.h"main(){intA,B,C,D,E,F,G,H,I,J;printf("pleaseinputnumbers\n");scanf("... #include "stdio.h"

main()
{ int A,B,C,D,E,F,G,H,I,J;
printf("please input numbers\n");
scanf("%2d,%2d,%2d,%2d,%2d,%2d,%2d,%2d,%2d,%2d",&A,&B,&C,&D,&E,&F,&G,&H,&I,&J);
printf("%2d %2d %2d %2d %2d %2d\n",A,B,E,G,I,J);
printf("%2d %2d %2d %2d %2d %2d\n",B,C,D,F,H,I);
printf("%2d %2d %2d %2d %2d %2d\n",A,C,E,G,H,J);
getch();
}
展开
 我来答
百度网友6205bc1
2010-10-23 · TA获得超过6004个赞
知道大有可为答主
回答量:5933
采纳率:20%
帮助的人:2776万
展开全部
#include <stdio.h>
#include<stdlib.h>

main()
{ int A,B,C,D,E,F,G,H,I,J;
FILE *FP;

FP = fopen("E:\\my.txt", "w");
printf("please input numbers\n");
scanf("%2d,%2d,%2d,%2d,%2d,%2d,%2d,%2d,%2d,%2d",&A,&B,&C,&D,&E,&F,&G,&H,&I,&J);
fprintf(FP, "%2d %2d %2d %2d %2d %2d\n",A,B,E,G,I,J);
fprintf(FP, "%2d %2d %2d %2d %2d %2d\n",B,C,D,F,H,I);
fprintf(FP, "%2d %2d %2d %2d %2d %2d\n",A,C,E,G,H,J);
//getch();
return 0;
}
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式