Aktualizovat "program.c

This commit is contained in:
Kristián Ruják 2019-03-13 22:51:21 +00:00
parent eb08dd5227
commit 36c9c8afd3

View File

@ -60,8 +60,7 @@ int main()
else if((d>=1 && d<=30) && m==4 || m==6 || m==9 || m==11)
{}
while (ko = 0){
return 0;}
@ -91,6 +90,10 @@ int main()
else if(d==29 && m==2 && (y%400==0 ||(y%4==0 && y%100!=0)))
{}
@ -105,6 +108,9 @@ int main()
else{
printf("Nespravny datum\n");
return 0;
@ -115,6 +121,11 @@ int main()
else
{
printf("Nespravny datum\n");
@ -134,11 +145,21 @@ int main()
else
{
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
@ -147,25 +168,38 @@ int main()
}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
struct tm t = { .tm_year=y-1900, .tm_mon=m-1, .tm_mday=d };
t.tm_mday += 7;
mktime(&t);
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(t.tm_mday <10 && t.tm_mon+1 < 10){
@ -179,6 +213,9 @@ int main()
else if(t.tm_mday < 10){
printf(" %d.%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900);
}
@ -205,6 +242,8 @@ int main()
else{
printf("%d.%d.%d\n\n", t.tm_mday, t.tm_mon+1, t.tm_year+1900);
}