This commit is contained in:
Yaroslav Orlianskyi 2022-03-02 14:14:37 +01:00
parent 9f3f30fe2c
commit 4a50937dab

View File

@ -2,32 +2,17 @@
int main(){ int main(){
int c = 0; int c = 0;
int a = 0; char a;
int counter = 0; while(1){
char small[] = "abcdefghijklmnopqrstuvwxyz";
char big[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char d;
while(c = 1){
c = getchar(); c = getchar();
d = c; if(c == EOF)
int a = 0;
if(d == '\n'){
counter++;
break; break;
} if (c >= 'a' && c <= 'z')
while(a > 26){ c = c - 'a' + 'A';
if(d == small[a]){ else if(c >= 'A' && c <= 'Z')
d = big[a]; c = c - 'A' + 'a';
break; a = c;
}else if(d == big[a]){ putchar(a);
d = small[a];
break;
}
a++;
}
c = d;
putchar (c);
} }
printf("\nPočet riadkov: %d\n",counter);
return 0; return 0;
} }