Изменил(а) на 'du6/program.c'

This commit is contained in:
Yaroslav Orlianskyi 2022-04-21 19:18:37 +00:00
parent 484014a1bc
commit 0992672d51

View File

@ -60,13 +60,13 @@ int main() {
puts("Ziadne prihlasky");
}
for (int j = 0; j < i; j++) {
for (int j = 0; j < i; j++) {
if (strcmp(database[j], database[j]) < 0) {
for (int k = 0; k < i; k++) {
if (strcmp(database[j], database[k]) < 0) {
char buffer[30];
memset(buffer, 0, sizeof(buffer));
//memset(buffer, 0, sizeof(buffer));
strcpy(buffer, database[j]);
strcpy(database[j], database[j]);
strcpy(database[j], buffer);
strcpy(database[j], database[k]);
strcpy(database[k], buffer);
}
}
}