daco
This commit is contained in:
parent
7982379fa9
commit
a1694f5a00
18
a1/program.c
18
a1/program.c
@ -2,7 +2,21 @@
|
|||||||
// Tu môžte dopísať Vaše funkcie
|
// Tu môžte dopísať Vaše funkcie
|
||||||
int main(){
|
int main(){
|
||||||
// Tu píšete program
|
// Tu píšete program
|
||||||
return 0;
|
caps();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
~
|
||||||
|
void caps() {
|
||||||
|
int c = getchar();
|
||||||
|
while(c != EOF){
|
||||||
|
char out = '';
|
||||||
|
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
|
||||||
|
out = (c < 'A') ? c - 'A'-'a' : c + 'A' - 'a';
|
||||||
|
} else if (c == '\n') {
|
||||||
|
out = c;
|
||||||
|
}
|
||||||
|
print(out);
|
||||||
|
|
||||||
|
}
|
||||||
|
print('\n');
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user