c语言 请大家看看是哪里出了错

编写一个函数output(),定于一个学生的成绩数组,该数组中有N个学生的信息(学号、姓名、3门课成绩),用主函数输入这些记录,用output()函数输出这些记录。

#include
#include
#define N 30
struct student
{
    int number;
    char name[10];
    double score[3];
}; 
void output(struct student *p,int n);
int main()
{
    int i;
    struct student stu[N]; 
    for(i=0;iscanf("%d %s %lf %lf %lf",&stu[i].number,stu[i].name,&stu[i].score[0],&stu[i].score[1],&stu[i].score[2]);
    output(stu,N);
    system("pause");
    return 0;
}

void output (struct student *p,int n)
{
    int i;
    for(i=0;iprintf("%10s",p[i].name);
        printf("%4d",p[i].number);
        printf("%8.2f %f %f",p[i].score[0],p[i].score[1],p[i].score[2]);
    }
}

用代码块功能插入代码,请勿粘贴截图。 不用代码块回答率下降 50%
运行结果及详细报错内容
我的解答思路和尝试过的方法,不写自己思路的,回答率下降 60%
我想要达到的结果,如果你需要快速回答,请尝试 “付费悬赏”

具体什么问题?

1.你输出的顺序与输入的不一致
2.输出的时候没有加空格,导致数据全粘一起了
3.输出的时候%f改为%lf