怎么用DEV C++中的文件feropen打印十个数之和

[复制链接]
查看11 | 回复2 | 2011-3-7 13:09:51 | 显示全部楼层 |阅读模式
是 怎么用DEV C++中的文件feropen打出十个数之和
我用这个程序结果不对
#include
int main ()
{

freopen("b.in","w",stdin);

freopen("b.out","w",stdout);

int i,a[10],s;

s=0;

scanf("%d",&a);

for(a=0;i<10;i++)
{

s=s+a;
}

printf("%d\n",s);

fclose(stdin);

fclose(stdout);

return 0;
}

回复

使用道具 举报

千问 | 2011-3-7 13:09:51 | 显示全部楼层
feropen ?? freopen?? 打印?? 这函数还有这功能?? - -
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行