pvjc25/du4/program.c
2025-03-13 20:53:16 +01:00

21 lines
398 B
C

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char name[100];
int golosa;
} nameandgolosa;
#define MAX_STUDENTS 1000;
int najtistudenta (nameandgolosa students[], int count, const char* name) {
for (int i = 0; i < count; i++) {
if (strcmp(students[i].name, name) == 0) {
return i;
}
}
return -1;
}