diff --git a/program.c b/program.c index d266bfb..d1e44c0 100644 --- a/program.c +++ b/program.c @@ -20,16 +20,13 @@ int main() mktime(&t); //output data - if(t.tm_mon+1 < 10){ - printf("%d.0%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900); - }else if(t.tm_mday <10 && t.tm_mon+1 < 10){ - printf(" %d.0%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900); - } - else if(t.tm_mday < 10){ - printf(" %d.%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900); - } - else{ + if(t.tm_mday <10 && t.tm_mon+1 < 10) + printf(" %d.0%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900); + else if(t.tm_mday < 10) + printf(" %d.%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900); + else if(t.tm_mon+1 < 10) + printf("%d.0%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900); + else printf("%d.%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900); - } }