diff --git a/a1/program.c b/a1/program.c index fbe1a87..1222bae 100644 --- a/a1/program.c +++ b/a1/program.c @@ -23,17 +23,23 @@ int main(){ } Dnes_Datum[id]='\0'; + char *start=Dnes_Datum, *end=NULL; + time_t t=time(NULL); + for(int i=0;i='0'&&Dnes_Datum[i]<='9')||Dnes_Datum[i]==' '||Dnes_Datum[i]=='\n'); else { printf("Neplatny datum.\n"); - return EXIT_SUCCESS; + while(Dnes_Datum[i]!='\n'){ + i++; + } + i++; + counter--; + start+=i; } } - char *start=Dnes_Datum, *end=NULL; - time_t t=time(NULL); for(int idx=0;idx