pvjc20/du1/program.c

29 lines
407 B
C
Raw Normal View History

2020-03-01 12:16:16 +00:00
#include <stdlib.h>
2020-02-29 17:23:39 +00:00
#include <stdio.h>
#include <ctype.h>
int main()
{
char simb;
int riad=0;
while(1){
simb=getchar();
if(islower(simb)){
simb-=32;
}
else if (isupper(simb)){
simb+=32;
}
else if(simb==EOF){
break;
}
putchar(simb);
if(simb=='\n'){
riad++;
}
}
2020-03-01 12:16:16 +00:00
printf("Počet riadkov %d",riad);
2020-02-29 17:23:39 +00:00
return 0;
}