2022-03-04 12:54:31 +00:00
|
|
|
#include<stdio.h>
|
|
|
|
|
|
|
|
int main(){
|
2022-03-04 13:08:02 +00:00
|
|
|
int counter=0, Sym;
|
2022-03-04 12:54:31 +00:00
|
|
|
char OutSym;
|
|
|
|
|
|
|
|
while(1){
|
2022-03-04 12:59:42 +00:00
|
|
|
Sym=getchar();
|
2022-03-04 13:14:31 +00:00
|
|
|
if(Sym=='\n'){
|
2022-03-31 11:13:17 +00:00
|
|
|
counter++; // пыдраховуэ рядки коли знаходить ентер
|
2022-03-04 13:08:02 +00:00
|
|
|
}
|
|
|
|
if(Sym==EOF){
|
2022-03-04 12:59:42 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
else if(Sym<='Z'&&Sym>='A')Sym +=32;
|
|
|
|
else if(Sym<='z'&&Sym>='a')Sym-=32;
|
|
|
|
OutSym=Sym;
|
|
|
|
putchar(OutSym);
|
|
|
|
}
|
2022-03-04 12:54:31 +00:00
|
|
|
printf("\nPočet riadkov: %d\n",counter);
|
|
|
|
return 0;
|
2022-03-31 11:13:17 +00:00
|
|
|
}
|