2022-03-03 13:27:06 +00:00
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int main(){
|
|
|
|
|
int inp_char;
|
|
|
|
|
char out_char;
|
|
|
|
|
int count_lines = 0;
|
|
|
|
|
while(1){
|
|
|
|
|
inp_char = getchar();
|
|
|
|
|
if(inp_char >= 'A' && inp_char <= 'Z') out_char = inp_char + 32;
|
|
|
|
|
else if(inp_char >= 'a' && inp_char <= 'z') out_char = inp_char - 32;
|
|
|
|
|
else if(inp_char == EOF) break;
|
|
|
|
|
else if(inp_char == '\n') {
|
|
|
|
|
count_lines++;
|
|
|
|
|
out_char = '\n';
|
|
|
|
|
}
|
|
|
|
|
else out_char = inp_char;
|
|
|
|
|
putchar(out_char);
|
|
|
|
|
}
|
2022-03-03 14:21:19 +00:00
|
|
|
|
int counter=0;
|
|
|
|
|
counter=count_lines;
|
|
|
|
|
printf("\nPo<EFBFBD>et riadkov: %d\n",counter);
|
2022-03-03 14:57:18 +00:00
|
|
|
|
return 0+1-1;
|
2022-03-03 13:27:06 +00:00
|
|
|
|
}
|