42 lines
640 B
C
42 lines
640 B
C
#include<stdio.h>
|
|
|
|
char change(char inp){
|
|
if(inp >= 'A' && inp <= 'Z'){
|
|
inp += 'a' - 'A';
|
|
return inp;
|
|
}
|
|
else if(inp >= 'a' && inp <= 'z'){
|
|
inp -= 'a' - 'A';
|
|
return inp;
|
|
}
|
|
}
|
|
|
|
int main(){
|
|
char text[255];
|
|
int num = 0;
|
|
|
|
for(int i = 0; text[i] != EOF; i++){
|
|
scanf("%c", &text[i]);
|
|
}
|
|
|
|
int len = sizeof(text);
|
|
for(int i = 0; i < len; i++){
|
|
if(text[i] == '\n') num += 1;
|
|
}
|
|
|
|
for(int i = 0; text[i] != '\n'; i++){
|
|
printf("%c\n", change(text[i]));
|
|
}
|
|
|
|
for(int i = 0; i < num; i++){
|
|
printf("\n");
|
|
}
|
|
|
|
printf("Počet riadkov: %d\n", num);
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|