final v
This commit is contained in:
parent
b7a6d05399
commit
53f9dd4590
17
program.c
17
program.c
@ -20,16 +20,13 @@ int main()
|
|||||||
mktime(&t);
|
mktime(&t);
|
||||||
|
|
||||||
//output data
|
//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);
|
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.0%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900);
|
printf(" %d.%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900);
|
||||||
}
|
else if(t.tm_mon+1 < 10)
|
||||||
else if(t.tm_mday < 10){
|
printf("%d.0%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900);
|
||||||
printf(" %d.%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900);
|
else
|
||||||
}
|
|
||||||
else{
|
|
||||||
printf("%d.%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900);
|
printf("%d.%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user