pvjc24/cv1/program.c

22 lines
362 B
C
Raw Normal View History

2024-02-17 16:49:04 +00:00
#include <stdio.h>
2024-02-15 07:23:00 +00:00
2024-02-17 16:49:04 +00:00
int main()
{
char c;
2024-02-22 12:36:59 +00:00
int counter=0;
2024-02-17 16:49:04 +00:00
while ((c = getchar()) != EOF) {
if(c<='z'&&c>='a'){
c=c+('A'-'a');
}else if(c<='Z'&&c>='A'){
c=c-('A'-'a');
}
2024-02-22 12:36:59 +00:00
if(c=='\n'){
counter++;
}
2024-02-17 16:49:04 +00:00
printf("%c",c);
}
2024-02-22 12:36:59 +00:00
printf("\nLines count: %d",counter);
2024-02-17 16:49:04 +00:00
return 0;
}