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");