This commit is contained in:
Andrii Hermaniuk 2022-03-04 13:59:42 +01:00
parent 43d4142500
commit 042e637c4f

View File

@ -5,14 +5,17 @@
char OutSym;
while(1){
Sym=getchar();
if(Sym==EOF || Sym==0)break;
else if(Sym<='Z'&&Sym>='A')Sym +=32;
else if(Sym<='z'&&Sym>='a')Sym-=32;
counter++;
OutSym=Sym;
putchar(OutSym);
}
Sym=getchar();
if(Sym==EOF || Sym==0){
counter++;
break;
}
else if(Sym<='Z'&&Sym>='A')Sym +=32;
else if(Sym<='z'&&Sym>='a')Sym-=32;
//counter++;
OutSym=Sym;
putchar(OutSym);
}
printf("\nPočet riadkov: %d\n",counter);
return 0;
}