corection2

This commit is contained in:
kr820js 2024-02-22 13:36:59 +01:00
parent 50ac9610ec
commit 2e5b5fe78b

View File

@ -4,14 +4,18 @@
int main() int main()
{ {
char c; char c;
int counter=0;
while ((c = getchar()) != EOF) { while ((c = getchar()) != EOF) {
if(c<='z'&&c>='a'){ if(c<='z'&&c>='a'){
c=c+('A'-'a'); c=c+('A'-'a');
}else if(c<='Z'&&c>='A'){ }else if(c<='Z'&&c>='A'){
c=c-('A'-'a'); c=c-('A'-'a');
} }
if(c=='\n'){
counter++;
}
printf("%c",c); printf("%c",c);
} }
printf("\n"); printf("\nLines count: %d",counter);
return 0; return 0;
} }