This commit is contained in:
Yaroslav Orlianskyi 2022-03-01 19:01:36 +01:00
parent fc03c592a4
commit 9f3f30fe2c

View File

@ -3,23 +3,31 @@
int main(){ int main(){
int c = 0; int c = 0;
int a = 0; int a = 0;
int counter = 0;
char small[] = "abcdefghijklmnopqrstuvwxyz"; char small[] = "abcdefghijklmnopqrstuvwxyz";
char big[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char big[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char d; char d;
while( c != EOF){ while(c = 1){
c = getchar(); c = getchar();
d = c; d = c;
int a = 0; int a = 0;
if(d == '\n'){
counter++;
break;
}
while(a > 26){ while(a > 26){
if(d == small[a]){ if(d == small[a]){
c = big[a]; d = big[a];
break; break;
}else if(d == big[a]){ }else if(d == big[a]){
c = small[a]; d = small[a];
break; break;
} }
a++;
} }
c = d;
putchar (c); putchar (c);
} }
printf("\nPočet riadkov: %d\n",counter);
return 0; return 0;
} }