标题:DONE从文件中读入整数
取消只看楼主
zzxwill
Rank: 1
等 级:新手上路
帖 子:398
专家分:0
注 册:2007-8-15
 问题点数:0 回复次数:0 
DONE从文件中读入整数
//我想从in.txt中读入整数,while中的循环条件是什么?我不会,谢谢~~
#include<stdio.h>
main()
{
FILE *in;
int a[100],i;
i=0;
in=fopen("in.txt","r");
do{
fscanf(in,"%d",&a[i]);
i++;

}while();
printf("%d",i);

}
in.txt:
123 234 345 456

[此贴子已经被作者于2007-11-18 10:35:13编辑过]

搜索更多相关主题的帖子: 入整数 DONE 文件 txt int 
2007-09-01 09:43



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-166960-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013075 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved