pvjc20/du1/program.c
Artem Horbunov ae8fc0610d funguje
2020-03-05 21:02:22 +01:00

26 lines
461 B
C

#include <stdio.h>
int main(){
int c = 0;
while(1){
char ch;
int num = 'a' - 'A';
scanf("%c", &ch);
if(ch == 'q' || ch == -1){
break;
}
c++;
if(ch <= 'A' && ch >= 'Z'){
ch += num;
c--;
}
else if(ch >= 'a' && ch <= 'z'){
ch -= num;
c--;
}
printf("%c", ch);
}
printf("Počet riadkov: %d\n", c);
}