From f7854aa287ed99c6ee327627be8a971f9212ae2f Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Thu, 26 Mar 2020 20:17:05 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu3/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du3/program.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/du3/program.c b/du3/program.c index 75169e4..1352511 100644 --- a/du3/program.c +++ b/du3/program.c @@ -16,7 +16,12 @@ int main() t.tm_mday += 7; - printf(" %d.%d.%d", t.tm_mday, t.tm_mon + 1, t.tm_year + 1900); + if(t.tm_mon + 1 < 10){ + printf(" %d.%d.%d", t.tm_mday, t.tm_mon + 1, t.tm_year + 1900); + } else{ + printf(" %d.0%d.%d", t.tm_mday, t.tm_mon + 1, t.tm_year + 1900); + } + exit(EXIT_SUCCESS);