From b3cb417ae2aec6920df552c83cb1578881399ed0 Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Fri, 22 Apr 2022 09:53:35 +0200 Subject: [PATCH] sds --- du6/program.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/du6/program.c b/du6/program.c index f6860d5..ef734d3 100644 --- a/du6/program.c +++ b/du6/program.c @@ -5,7 +5,7 @@ int compare(const void* arg1, const void* arg2); -int main(){ +int main(a){ char* pole_smernikov[SIZE]; memset(pole_smernikov,0,SIZE*sizeof(char*)); @@ -15,6 +15,10 @@ int main(){ int p = 0; scanf("%d",&p); getchar(); + if(p<1){ + printf("Nespravny vstup\n"); + return 0; + } while(1){ char line[SIZE]; @@ -41,13 +45,13 @@ int main(){ int skip=0; - for(int j = 0;skip==0&& j='0'&&pole_smernikov[j][i]<='9'){ printf("Nespravny vstup\n"); skip=1; } - } + } } if (!skip){ @@ -59,6 +63,7 @@ int main(){ for(int i = p; i