#include<stdio.h>
//구조체를 선언했습니다.

struct list
{

long int chabi;    //값이 커질것 같아서 롱인트로 명령을 내렸습니다.
long int eat;
long int play;
long int tot;

};

//입력함수를 선언했습니다.//

int input_data(struct list *p);

//출력함수를 선언했습니다.//

void output_data(struct list *p, int n);

//파일기록함수를 선언했습니다.//

void write_data(struct list *p, int n);

//보이드메인 함수를 선언했습니다..//

void main()
{
 struct list data[50];; //데이타 레포드를 50개선언
   int n;

   printf(\"학교나가는일수, 점심을먹는횟수, 쉬는날을 입력하시오\\n\");
   n = input_data(&data[0]); //데이터입력함수 호출하였습니다.//
   putchar(\'\\n\');
   printf(\"일주일 생활비출력\\n\");
   output_data(&data[0], n);
   putchar(\'\\n\');
   write_data(&data[0],n);
 }

 //입력함수정의

 int input_data(struct list *p)
 {
      int i=0;

 while(scanf(\"%d %d %d\",
   &(p+i)->chabi, &(p+i)->eat), &(p+i)->play))!=EOF)
 {
 ((p+i)->tot) -> ((p+i)->chabi)*2000 + ((p+i)->eat)*2500 + ((p+i)->play)*5000);
 i++;

 if(i>50)
 braek;
 
 return(i);
 }


 void output_data(struct list *p, int n)
 {
 int i;

 for(i=0; i<n; i++)
 {
 printf(\"%d , %d , %d , %d \\n\", (p+i)->chabi, (p+i)->eat, (p+i)->play, (p+i0->tot);
 }
 }

 void weite_data(struct list *p, int n)
 {
  FILE *fp;
  int i;
  fp=fopen(\"file.dat\",\"w\");
  if(fp != NULL)
  {
   for(i=0 i<n; i++)
    {
    fprintf(fp,\"%d, %d, %d, %d \\n\", (p+i)->chabi, (p+i)->eat, (p+i)->play, (p+i0->tot);
    }
    }
    fclose(fp);
    }
   
   





오류 3개

이게 제 한계인듯..ㅠㅠㅠ늅늅늅 살려주세요 으허허헝

뭐가틀린거지.....