标题:那位帮我看下这个程序问题出在哪里啊
取消只看楼主
张倚川
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2011-6-11
结帖率:54.55%
已结贴  问题点数:20 回复次数:1 
那位帮我看下这个程序问题出在哪里啊
#include <stdio.h>
#include <stdlib.h>
struct Student
{char name[20];
char reason[20];
float money;
}std,pers[20],*pstd;
int main()
{FILE *fp;
char ch;
int i,x;
struct Student student[100];
printf("number: ");
scanf("%d",&x);
for(i=0;i<x;i++)
    {
        printf("input student%d info\n",i+1);
        printf("name reason money");
        scanf("%s",&student[i].name);getchar();
        scanf("%s",&student[i].reason);getchar();
        scanf("%f",&student[i].money);}
if((fp=fopen("file1.dat","w"))==NULL)
{printf("Can't open this file1!\n");exit(0);}
ch=getchar();
while(ch!='@')
{fputc(ch,fp);ch=getchar();
}fclose(fp);}
搜索更多相关主题的帖子: money info 
2011-06-16 22:26
张倚川
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2011-6-11
得分:0 
回复 2楼 voidx
??什么意思
2011-06-16 23:46



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




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

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