Aktualizovat du1/program.c
This commit is contained in:
parent
847e079926
commit
0fdcb8f532
@ -3,39 +3,5 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
int pocetRiadkov = 0;
|
||||
while (1)
|
||||
{
|
||||
int vstup = getchar();
|
||||
if (vstup == EOF) {break;}
|
||||
|
||||
if (vstup == '\n')
|
||||
{
|
||||
pocetRiadkov += 1;
|
||||
putchar(vstup);
|
||||
}
|
||||
else if (vstup < 32 || vstup == 127)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (vstup == '\r')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (islower(vstup) != 0)
|
||||
{
|
||||
putchar(toupper(vstup));
|
||||
}
|
||||
else if (isupper(vstup) != 0)
|
||||
{
|
||||
putchar(tolower(vstup));
|
||||
}
|
||||
else if (vstup >= 32 && vstup <= 126)
|
||||
{
|
||||
putchar(vstup);
|
||||
}
|
||||
|
||||
}
|
||||
printf("\nLines_count: %d\n", pocetRiadkov);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user