Изменил(а) на 'a1/program.c'
This commit is contained in:
parent
30e0ca4e1b
commit
fb8f070327
11
a1/program.c
11
a1/program.c
@ -17,6 +17,7 @@ int main() {
|
||||
int cislo = 0;
|
||||
int counter = 0;
|
||||
int che = 0;
|
||||
int count = 0;
|
||||
while ((r = fgets(znaky, LINE_SIZE, stdin)) != NULL) {
|
||||
if (feof(stdin)) {
|
||||
break;
|
||||
@ -49,11 +50,21 @@ int main() {
|
||||
if(yyyy < 1900 || yyyy > 2100){
|
||||
che = 1;
|
||||
}
|
||||
if(yyyy % 100 != 0 && yyyy % 4 == 0){
|
||||
count++;
|
||||
}
|
||||
if(yyyy % 400 == 0){
|
||||
count++;
|
||||
}
|
||||
}
|
||||
counter++;
|
||||
zaciatok_cisla = koniec_cisla + 1;
|
||||
}
|
||||
}
|
||||
if(count != 1 && mm == 2 && dd == 29){
|
||||
che = 1;
|
||||
//printf("Neplatny datum.\n");
|
||||
}
|
||||
if(counter != 3 || che == 1){
|
||||
printf("Neplatny datum.\n");
|
||||
che = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user