From 56dd2d27d125ad50a0f1a7fd0ced1ce32eedb1b4 Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Sun, 27 Mar 2022 19:50:02 +0200 Subject: [PATCH] aaa --- a1/program.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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