Изменил(а) на 'du1/program.c'
This commit is contained in:
parent
e275814e81
commit
2d047c0e76
@ -5,37 +5,28 @@ int main(){
|
|||||||
int c = 0;
|
int c = 0;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int riadok = 0;
|
int riadok = 0;
|
||||||
int pop = 0;
|
|
||||||
while(c != EOF){
|
while(c != EOF){
|
||||||
c = getchar();
|
c = getchar();
|
||||||
if(c == EOF){
|
if(c == EOF){
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
if (c == '\n') {
|
||||||
|
putchar(c);
|
||||||
|
riadok++;
|
||||||
}
|
}
|
||||||
if((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')){
|
if((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')){
|
||||||
if(islower(c)){
|
if(islower(c)){
|
||||||
c = toupper(c);
|
c = toupper(c);
|
||||||
printf("%c\n", c);
|
printf("%c\n", c);
|
||||||
riadok++;
|
riadok++;
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
if(isupper(c) && count == 0){
|
if(isupper(c) && count == 0){
|
||||||
c = tolower(c);
|
c = tolower(c);
|
||||||
printf("%c\n", c);
|
printf("%c\n", c);
|
||||||
riadok++;
|
riadok++;
|
||||||
}
|
}
|
||||||
pop++;
|
|
||||||
}
|
}
|
||||||
if(c == 10){
|
|
||||||
printf("\n");
|
|
||||||
riadok++;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
if(pop == 0){
|
|
||||||
printf("%c\n", c);
|
|
||||||
riadok++;
|
|
||||||
}}
|
|
||||||
count = 0;
|
|
||||||
pop = 0;
|
|
||||||
}
|
}
|
||||||
printf("\nPočet riadkov: %d\n", riadok);
|
printf("\nPočet riadkov: %d\n", riadok);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user