KakaoTalk_20190606_001802318.png
  • 246x0w
Welcome
Curriculum
Install&Go
Board
실제 작동 상태를 확인하려면 라이브 사이트로 이동하세요.
  • 카테고리
  • 전체 게시물
  • 내 게시물
최종혁
2020년 4월 18일

20200418

게시판: 소스 코드 제출

#include<stdio.h>

struct student

{

int c;

int ap;

int grade;



};

int main()

{

int n,i,j, max=0,mi=0;

int mp;

struct student sc[105];

scanf("%d", &n);

for(i=0; i<n; i++)

{

scanf("%d %d %d",&sc[i].c, &sc[i].ap, &sc[i].grade);

}


for(j=0; ;j++)

{

for(i=0; i<n; i++)

{

if(max<sc[i].grade)

{

max=sc[i].grade;

mi=i;

printf("max = %d\n",max);

}

}

printf("%d %d\n",sc[mi].c,sc[mi].ap);

sc[mi].grade=0;

max=0;



if(mp>2)

{

printf("%d", sc[i].c);

}


}

return 0;

}


/*

#include<stdio.h>

int main()

{

int i,n, max = -1;

int arr[10000]= {0};

scanf("%d", &n);

for(i=0; i<n; i++)

{

scanf("%d", &arr[i]);

}

for(i=0; i<n; i++)

{

if(max<arr[i])

{

max=arr[i];

}


}


printf("%d", max);


return 0;



}

*/


댓글 0개
0
댓글
댓글 0개
유사 게시물
  • 20200418
  • 220807
  • 20220807
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호