This commit is contained in:
Pavlo Tverdyi 2020-03-01 13:27:06 +01:00
parent 573e609006
commit f265d52225

View File

@ -7,22 +7,25 @@ int main()
char simb; char simb;
int riad=0; int riad=0;
while(1){ while(1){
simb=getchar(); simb=getchar();
if(islower(simb)){ if(islower(simb)){
simb-=32; simb-=32;
}
else if (isupper(simb)){
simb+=32;
}
else if(simb==EOF){
break;
}
putchar(simb);
if(simb=='\n'){
riad++;
}
if(simb=='\n'){
riad++;
}
} }
else if (isupper(simb)){ printf("\nPočet riadkov: %d\n",riad);
simb+=32;
}
else if(simb==EOF){
break;
}
putchar(simb);
if(simb=='\n'){
riad++;
}
}
printf("Počet riadkov %d",riad);
return 0; return 0;
} }