2022-03-04 11:38:38 +00:00
|
|
|
#include<stdio.h>
|
|
|
|
|
|
|
|
int main(){
|
2022-03-17 18:44:41 +00:00
|
|
|
int counter=0, Sym;
|
|
|
|
char OutSym;
|
2022-03-04 11:38:38 +00:00
|
|
|
|
2022-03-17 18:44:41 +00:00
|
|
|
while(1){
|
|
|
|
Sym=getchar();
|
|
|
|
if(Sym=='\n'){
|
|
|
|
counter++;
|
|
|
|
}
|
|
|
|
if(Sym==EOF){
|
|
|
|
//counter++;
|
|
|
|
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);
|
2022-03-04 11:38:38 +00:00
|
|
|
return 0;
|
2022-03-17 18:44:41 +00:00
|
|
|
}
|