Aktualizovat a1/program.c

This commit is contained in:
Tomáš Vlček 2026-02-20 23:11:45 +00:00
parent dc657d00e1
commit 65f7d03c13

View File

@ -7,24 +7,21 @@ int main()
while (1) while (1)
{ {
int vstup = getchar(); int vstup = getchar();
if (vstup == EOL) {break;} if (vstup == EOF) {break;}
if (vstup == '\n') if (vstup == '\n')
{ {
pocetRiadkov += 1; pocetRiadkov += 1;
putchar(vstup); putchar(vstup);
} }
else if (islower(vstup) != 0) else if (islower(vstup) != 0)
{ {
putchar(toupper(vstup)); putchar(toupper(vstup));
} }
else if (isupper(vstup) != 0) else if (isupper(vstup) != 0)
{ {
putchar(tolower(vstup)); putchar(tolower(vstup));
} }
else if (iscntrl(vstup) != 0) else if (iscntrl(vstup) != 0)
{ {
putchar(vstup); putchar(vstup);