21 lines
398 B
C
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;
|
|
}
|