목록2025/02/01 (1)
'll Hacker
EVI$ION 겨울방학 코테스터디 4주차 과제
정렬 알고리즘선택 정렬 삽입 정렬 버블 정렬 합병 정렬 퀵 정렬 개념 참고)https://hsp1116.tistory.com/33 10825, 국영수, C++학생 정보 = 구조체 선언sort( ) 사용 #include #include #include using namespace std;struct student { // 학생 정보 구조체: 이름, 국어 점수, 영어 점수, 수학 점수 string name; int kor, eng, math;};// 비교 함수bool cmpAdv(const student& s1, const student& s2) { if (s1.kor != s2.kor) {// 국어 점수가 감소하는 순서 return s1.kor > s2.kor; } if (s1.eng != s2.eng)..
Dev
2025. 2. 1. 23:18