druha verzia

This commit is contained in:
Oleksandr Hryshchenko 2021-02-23 16:25:54 +01:00
parent 679ac1a18e
commit e1f2bf693b

View File

@ -1,6 +1,20 @@
#include <stdio.h>
int main (){
printf("Ahoj Svet\n");
int c = 0;
int counter = 0;
while(c != EOF){
c = getchar();
if (c >= 'a' && c <= 'z'){
putchar (c - 'a' + 'A');
}
else if ( c >= 'A' && c <= 'Z'){
putchar (c + 'a' - 'A');
}
counter++;
}
printf("\nPočet riadkov: %d\n",counter);
return 0;
}