From d4364a3d88504b658b304bce0554f13425f8ca60 Mon Sep 17 00:00:00 2001 From: Vladyslav Korzun Date: Wed, 1 Mar 2023 14:21:26 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BB(=D0=B0)=20?= =?UTF-8?q?'du3/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du3/program.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 du3/program.c diff --git a/du3/program.c b/du3/program.c new file mode 100644 index 0000000..6f839b3 --- /dev/null +++ b/du3/program.c @@ -0,0 +1,23 @@ +#include +#include +#include +#include +#define LINE_SIZE 10 +int main(){ +char riadok[LINE_SIZE]; +memset(riadok, 0,LINE_SIZE); +char* r = fgets(riadok,LINE_SIZE,stdin); +assert(r!=NULL); +int r2 = atol(riadok); +int stop = 0; +if (r2 == 0){ + printf("Konverzia sa nepodarila alebo v reťazci sa nachádza nula."); +stop++; +} +if(stop == 0){ +printf("%d", r2); + +} + + +}