From a2dae92af93b8431b053db424590388042128232 Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Tue, 9 Mar 2021 23:15:16 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'du3/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du3/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/du3/program.c b/du3/program.c index 2168d46..6531677 100644 --- a/du3/program.c +++ b/du3/program.c @@ -10,11 +10,11 @@ int main() { fgets(input, 11, stdin); for(int i = 0; i < 11; i++){ - if(!isdigit(input[i]) && input[i] != '.' && input[i] != '\n'){ + if(!isdigit(input[i]) && input[i] != '.' && input[i] != '\0' && input[i] != '\n'){ break; } - if(input[i] != '.' && input[i] != '\n'){ + if(input[i] != '.' && input[i] != '\n' && input[i] != '\0'){ numbers[counter1++] = input[i]; } else {