asd
This commit is contained in:
parent
9226e6f4a6
commit
f7c0978ec3
BIN
du4/program
BIN
du4/program
Binary file not shown.
@ -7,14 +7,13 @@ int main() {
|
|||||||
int studentCount = 0;
|
int studentCount = 0;
|
||||||
int aHlasy;
|
int aHlasy;
|
||||||
char aMeno[30];
|
char aMeno[30];
|
||||||
char medzera;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
while (scanf("%d", &aHlasy) == 1) {
|
while (scanf("%d", &aHlasy) == 1) {
|
||||||
scanf("%c", &medzera);
|
getchar();
|
||||||
fgets(aMeno, 30, stdin);
|
fgets(aMeno, sizeof(aMeno), stdin);
|
||||||
aMeno[strlen(aMeno)-1] = '\0';
|
aMeno[strcspn(aMeno, "\n")] = 0;
|
||||||
|
|
||||||
|
int i;
|
||||||
for (i = 0; i < studentCount; i++) {
|
for (i = 0; i < studentCount; i++) {
|
||||||
if (strcmp(listM[i], aMeno) == 0) {
|
if (strcmp(listM[i], aMeno) == 0) {
|
||||||
listH[i] += aHlasy;
|
listH[i] += aHlasy;
|
||||||
|
Loading…
Reference in New Issue
Block a user