37 lines
709 B
C
37 lines
709 B
C
#include <stdio.h>
|
|
#include <ctype.h>
|
|
|
|
int main()
|
|
{
|
|
int pocetRiadkov = 0;
|
|
while (1)
|
|
{
|
|
int vstup = getchar();
|
|
if (vstup == EOF) {break;}
|
|
|
|
if (vstup == '\n')
|
|
{
|
|
pocetRiadkov += 1;
|
|
putchar(vstup);
|
|
}
|
|
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;
|
|
} |