From 9839168322bbf8cd274b508b2215eecfe2c49621 Mon Sep 17 00:00:00 2001 From: ak643du Date: Thu, 22 Feb 2024 14:45:02 +0100 Subject: [PATCH] work --- cv2/program.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cv2/program.c b/cv2/program.c index d4ef6a8..e670a2a 100644 --- a/cv2/program.c +++ b/cv2/program.c @@ -8,6 +8,11 @@ int main(){ int highest = 0; int r = scanf("%d", &field); - printf("Súťažiaci č. %d vypil %d pohárov.\n",i+1,results[i]); + if (r == 1){ + printf("Súťažiaci č. %d vypil %d pohárov.\n",i+1,results[i]); + } + else { + printf("Načítanie sa nepodarilo. V premennej value ostala pôvodná hodnota. \n"); + } }