Aktualizovat "program.c

This commit is contained in:
Kristián Ruják 2019-03-13 22:44:28 +00:00
parent 48c9719c6e
commit aa40bc2677

View File

@ -48,39 +48,20 @@ int main()
if((d>=1 && d<=31) && (m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12)) if((d>=1 && d<=31) && (m==1 || m==3 || m==5 || m==7 || m==8 || m==10 || m==12))
{} {}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
else if((d>=1 && d<=30) && m==4 || m==6 || m==9 || m==11) else if((d>=1 && d<=30) && m==4 || m==6 || m==9 || m==11)
{} {}
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(ko = 0){
return 0;}
@ -125,13 +106,7 @@ int main()
else else
{ {
printf("Nespravny datum\n"); printf("Nespravny datum\n");
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
@ -144,30 +119,13 @@ int main()
else else
{ {
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
if(ko = 0){
return 0;}
printf("Nespravny datum\n"); printf("Nespravny datum\n");
return 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 }; struct tm t = { .tm_year=y-1900, .tm_mon=m-1, .tm_mday=d };
t.tm_mday += 7; t.tm_mday += 7;