This commit is contained in:
Pavlo Tverdyi 2020-03-01 13:33:27 +01:00
parent f265d52225
commit 3502265db7

View File

@ -8,22 +8,19 @@ int main()
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)){ else if (isupper(simb)){
simb+=32; simb+=32;
} }
else if(simb==EOF){ else if(simb==EOF){
break; break;
} }
if(simb=='\n'){
riad++;
}
putchar(simb); putchar(simb);
if(simb=='\n'){
riad++;
}
if(simb=='\n'){
riad++;
}
} }
printf("\nPočet riadkov: %d\n",riad); printf("\nPočet riadkov: %d\n",riad);
return 0; return 0;