fix
This commit is contained in:
parent
2d7275b598
commit
c5aa6866c5
33
a1/program.c
33
a1/program.c
@ -1,7 +1,30 @@
|
||||
// Definícia funkcií ktoré budete používať
|
||||
#include <stdio.h>
|
||||
// Tu môžte dopísať Vaše funkcie
|
||||
int main(){
|
||||
// Tu píšete program
|
||||
return 0;
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
int main() {
|
||||
int o;
|
||||
int riadok = 0;
|
||||
|
||||
while ((o = getchar()) != EOF) {
|
||||
if (o >= 'a' && o <= 'z') {
|
||||
putchar(o - 32);
|
||||
}
|
||||
else if (o == '\n') {
|
||||
putchar(o);
|
||||
riadok = riadok + 1;
|
||||
|
||||
|
||||
}
|
||||
else if (o >= 'A' && o <= 'Z') {
|
||||
putchar(o + 32);
|
||||
}
|
||||
else if (isprint(o)) {
|
||||
putchar(o);
|
||||
}
|
||||
}
|
||||
|
||||
printf("\nLines_count: %d\n", riadok);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user