diff --git a/du2/program.c b/du2/program.c index e98e347..2e68145 100644 --- a/du2/program.c +++ b/du2/program.c @@ -1,11 +1,31 @@ +#include #include +#include +#include +#include + +#define SIZE 128 + int main() { + struct student { + char name[SIZE]; + int votes; + }; + + char meno[SIZE]; char line[SIZE]; memset(line,0,SIZE); char* r = fgets(line,SIZE,stdin); - if (r == NULL){ - + if (r == NULL) + { + printf("Chyba: Zlyhalo nacitavanie vstupu.\n"); + + } + char* end = NULL; + int value = strtol(line,&end,10); + if (value == 0){ + // Premena sa nepodarila } return 0; } \ No newline at end of file