This commit is contained in:
Oleksandr Vyshniakov 2025-03-14 15:28:23 +01:00
parent cf854506ab
commit 078b4436d6
2 changed files with 16 additions and 0 deletions

View File

@ -18,3 +18,19 @@ int najtistudenta (nameandgolosa students[], int count, const char* name) {
} }
return -1; return -1;
} }
int compare (const void* a, const void* b) {
nameandgolosa* studentA = (nameandgolosa*)a;
nameandgolosa* studentB = (nameandgolosa*)b;
if (studentA->golosa != studentB->golosa) {
return studentB->golosa - studentA->golosa;
}
return strcmp(studentA->name, studentB->name);
}
int main() {
return 0;
}

BIN
du4/program.exe Normal file

Binary file not shown.