生化危机5专家难度濒死:C语言会者请进,谢谢。

来源:百度文库 编辑:中科新闻网 时间:2024/05/12 09:43:50
#include<malloc.h>
#define NULL 0
#define LEN sizeof(struct student )
struct student
{
long num;
float score;
struct student *next;
};

main()
{
struct student *p;

p=(struct student *)malloc(LEN); if(p!=NULL) printf("success!!\n"); puts("input num and score\n");
scanf("%ld%f",&p->num,&p->score);
printf("%ld\t%f\n",p->num,p->score);

getch(); getch();
}
编译没错可不出结果是什么呢?是可是我们刚学的。最简单的一个了。我是不是笨啊。

输入啊,添链表的内容。

程序没错啊,它不是等待你输入吗?你输入完了还没结果?
我这里很正常啊