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