From 16976674a21c19c464abdf9a06e3ec998067ea57 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Thu, 26 Mar 2020 11:06:57 +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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/du3/program.c b/du3/program.c index 636ee53..d64438b 100644 --- a/du3/program.c +++ b/du3/program.c @@ -32,11 +32,17 @@ if(m>12){ day--; y++; } -if(m>9){ +if(m>9 && day>9){ printf("%d.%d.%d\n",day,m,y); } +else if(m<10 && day>9){ + printf("%d.0%d.%d\n",day,m,y); +} +else if(m>9 && day<10){ + printf(" %d.%d.%d\n",day,m,y); +} else{ - printf(" %d.0%d.%d\n",day,m,y); + printf(" %d.0%d.%d\n",day,m,y); } printf("\n");