pvjc20/du1/program.c
Pavlo Tverdyi f265d52225 funguje
2020-03-01 13:27:06 +01:00

32 lines
476 B
C

#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
int main()
{
char simb;
int riad=0;
while(1){
simb=getchar();
if(islower(simb)){
simb-=32;
}
else if (isupper(simb)){
simb+=32;
}
else if(simb==EOF){
break;
}
putchar(simb);
if(simb=='\n'){
riad++;
}
if(simb=='\n'){
riad++;
}
}
printf("\nPočet riadkov: %d\n",riad);
return 0;
}