funguje
This commit is contained in:
parent
5502f08192
commit
77b6705fc1
19
du1/program.c
Normal file
19
du1/program.c
Normal file
@ -0,0 +1,19 @@
|
||||
#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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user