pvjc20/du1/program.c
Artem Horbunov 77b6705fc1 funguje
2020-03-05 18:42:03 +01:00

20 lines
362 B
C

#include <stdio.h>
int main(){
while(1){
char ch;
int num = 'a' - 'A';
scanf("%c", &ch);
if(ch == EOF || ch == -1){
return 0;
}
if(ch <= 'A' && ch >= 'Z'){
ch += num;
}
else if(ch >= 'a' && ch <= 'z'){
ch -= num;
}
printf("%c", ch);
}
}