Merge branch 'master' of git.kemt.fei.tuke.sk:oh735kh/pvjc21
Marge
This commit is contained in:
commit
c83790f5b2
10
a1/program.c
10
a1/program.c
@ -6,10 +6,10 @@
|
||||
int main () {
|
||||
char* BMW = (char*) calloc (100, sizeof(char));
|
||||
int x;
|
||||
int counter;
|
||||
int counter = 0;
|
||||
int numbers [100];
|
||||
for (int i = 0; fgets(BMW, 100, stdin) != NULL; i++){
|
||||
if (!strcmp("\n", BMW) || !strcmp(" ", BMW)) {
|
||||
if (!strcmp("\n", BMW)) {
|
||||
counter = i;
|
||||
break;
|
||||
}
|
||||
@ -17,7 +17,7 @@ int main () {
|
||||
x = atoi (BMW);
|
||||
}
|
||||
else {
|
||||
numbers [i] = atoi [BMW];
|
||||
numbers [i] = atoi (BMW);
|
||||
}
|
||||
}
|
||||
int result = 0;
|
||||
@ -26,5 +26,7 @@ int main () {
|
||||
counter --;
|
||||
}
|
||||
printf ("Vysledok je: ");
|
||||
printf ("%d\n", result);
|
||||
printf ("%d\n", &result);
|
||||
free(BMW);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user