From 0ff187d49664c472e2609d4cb453fea56669d176 Mon Sep 17 00:00:00 2001 From: Patrik Seman Date: Sat, 15 Apr 2023 11:58:10 +0200 Subject: [PATCH] ,. --- du6/program.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/du6/program.c b/du6/program.c index 625f6c1..ac10b0c 100644 --- a/du6/program.c +++ b/du6/program.c @@ -13,6 +13,9 @@ int main(){ int pocet_mien=0; scanf("%d\n", &pocet); + if(pocet<1){ + puts("Nespravny vstup"); + } while(fgets(riadok,50,stdin)!=NULL && riadok[0]!='\n'){ if(riadok[strlen(riadok)-1]=='\n'){ riadok[strlen(riadok)-1]='\0';