Update du1/program.c
kostra
This commit is contained in:
parent
c381ecc03f
commit
2247d7eead
@ -2,20 +2,12 @@
|
||||
|
||||
int main(){
|
||||
|
||||
int c= 0;
|
||||
while(1){
|
||||
char riadok[LINE_SIZE];
|
||||
memset(riadok, 0,LINE_SIZE);
|
||||
char* r = fgets(riadok,LINE_SIZE,stdin);
|
||||
|
||||
c = getchar();
|
||||
if (c < 0) break;
|
||||
|
||||
if (c >= 97 && c <= 122){
|
||||
c = c - 'a' + 'A';
|
||||
} else
|
||||
if (c >= 65 && c <= 90){
|
||||
c = c - 'A' + 'a';
|
||||
if (r == NULL){
|
||||
return 0;
|
||||
}
|
||||
putchar(c);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user