Изменил(а) на 'a1/program.c'
This commit is contained in:
parent
74aa4959ad
commit
bef7e19ebe
@ -16,6 +16,7 @@ int main() {
|
|||||||
char* zaciatok_cisla = znaky;
|
char* zaciatok_cisla = znaky;
|
||||||
int cislo = 0;
|
int cislo = 0;
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
|
int che = 0;
|
||||||
while ((r = fgets(znaky, LINE_SIZE, stdin)) != NULL) {
|
while ((r = fgets(znaky, LINE_SIZE, stdin)) != NULL) {
|
||||||
if (feof(stdin)) {
|
if (feof(stdin)) {
|
||||||
break;
|
break;
|
||||||
@ -43,7 +44,7 @@ int main() {
|
|||||||
}
|
}
|
||||||
if(counter != 3){
|
if(counter != 3){
|
||||||
printf("Neplatny datum.\n");
|
printf("Neplatny datum.\n");
|
||||||
break;
|
che = 1;
|
||||||
}
|
}
|
||||||
//printf("%d %d %d\n", dd, mm, yyyy);
|
//printf("%d %d %d\n", dd, mm, yyyy);
|
||||||
time_t t = time(NULL);
|
time_t t = time(NULL);
|
||||||
@ -68,12 +69,14 @@ int main() {
|
|||||||
if(buffer[3] == 48){
|
if(buffer[3] == 48){
|
||||||
buffer[3] = '&';
|
buffer[3] = '&';
|
||||||
}
|
}
|
||||||
|
if(che == 0){
|
||||||
for(int i = 0; i < 10; i++){
|
for(int i = 0; i < 10; i++){
|
||||||
if(buffer[i] != '&'){
|
if(buffer[i] != '&'){
|
||||||
printf("%c", buffer[i]);
|
printf("%c", buffer[i]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
printf("\n\n");
|
printf("\n\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user