top of page

소스 코드 제출

공개·회원 50명

20250802

/*

#include <stdio.h>

char result[101]= {};

char* mysubstr(char* str, int start, int count)

{

int i;

for(i=0; i<count && str[start+i] != NULL; i++)

{

result[i] = str[start+i];

}

result[i] = NULL;

return result;

}


int main()

{

char str[101]= {};

int start, count;


scanf("%s", str);

scanf("%d %d", &start, &count);


printf("%s", mysubstr(str, start, count));

return 0;

}

*/

/**

구조체 struct : 내가 만드는 자료형 (사용자 정의 자료형)

ex) 학생 관리 시스템 -> 학생의 정보 (나이(정수), 이름(문자열), 키(실수))

*/

/*

typedef struct

{

char name[15];

int a, b, c;

}student;


#include <stdio.h>


typedef struct

{

int age;

float height;

}student;


int main()

{

// int age[100];

// float height[100];

// 5번째 학생의 나이 접근 age[5]



student arr[100];

arr[5].age = 50;

arr[5].height = 180.4;


for()

{

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

}

return 0;

}*/

/*

#include <stdio.h>


typedef struct

{

int score;

int rank;

}student;


int main()

{

int n,i,j,k=1;

student arr[200]={};

scanf("%d",&n);

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

{

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

}


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

{

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

{

if(arr[i].score < arr[j].score)

{

k++;

}

arr[i].rank = k;

}

k=1;

}


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

{

printf("%d %d\n",arr[i].score, arr[i].rank);

}


return 0;

}

*/


// 1등한 학생의 성적

#include <stdio.h>


typedef struct

{

char name[15];

int a, b, c;

}student;


int main()

{

student arr[100];

int n,i,j,max=0;

scanf("%d",&n);

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

{

scanf("%s %d %d %d", arr[i].name, &arr[i].a, &arr[i].b, &arr[i].c);

}


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

{

if(max<arr[i].a)

{

max=arr[i].a;

}

}

printf("%s %d %d",)

return 0;

}

2회 조회
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546 ,     031) 215 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호
bottom of page