#include<stdio.h>

struct list
{

long chabi;   
long eat;
long play;
long 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];
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);
 }
 }




인트값 3개 받아서 인트값 각각에 2000원 2500원 5000원 곱한값하고 곱한걸 모두 더한값 출력하는 시스템

간단히 만드는 중인데..여기서 막혀서... 고수님들 헬프..ㅜ.ㅜ