42 lines
686 B
C
42 lines
686 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <ctype.h>
|
|
#include <stdbool.h>
|
|
|
|
int main()
|
|
{
|
|
int pocetRiadkov = 0;
|
|
while (1)
|
|
{
|
|
int vstup = getchar();
|
|
if (vstup == EOF)
|
|
{
|
|
break;
|
|
}
|
|
|
|
if (vstup == '\n')
|
|
{
|
|
pocetRiadkov += 1;
|
|
putchar(vstup);
|
|
}
|
|
|
|
else if (islower(vstup) != 0)
|
|
{
|
|
putchar(toupper(vstup));
|
|
}
|
|
|
|
else if (isupper(vstup) != 0)
|
|
{
|
|
putchar(tolower(vstup));
|
|
}
|
|
|
|
else if (iscntrl(vstup) != 0)
|
|
{
|
|
continue;
|
|
}
|
|
|
|
}
|
|
printf("Lines_count: %d\n", pocetRiadkov);
|
|
return 0;
|
|
}
|