pvjc22/du1/program.c

18 lines
399 B
C
Raw Normal View History

2022-03-04 12:54:31 +00:00
#include<stdio.h>
int main(){
int counter=0, Sym;
char OutSym;
while(1){
Sym=getchar();
if(Sym==EOF || Sym==0)break;
else if(Sym<='Z'&&Sym>='A')Sym +=32;
else if(Sym<='z'&&Sym>='a')Sym-=32;
counter++;
OutSym=Sym;
putchar(OutSym);
}
printf("\nPočet riadkov: %d\n",counter);
return 0;
}