This commit is contained in:
Kyryl Kobzar 2019-03-14 22:13:58 +01:00
parent b7a6d05399
commit 53f9dd4590

View File

@ -20,16 +20,13 @@ int main()
mktime(&t);
//output data
if(t.tm_mon+1 < 10){
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 && t.tm_mon+1 < 10){
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 if(t.tm_mday < 10){
else
printf("%d.%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);
}
}