From c7706f9f1b456fcb51abe4168af8f1f55f0a4262 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Sat, 29 Feb 2020 18:20:33 +0100 Subject: [PATCH] 111 --- program.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 program.c diff --git a/program.c b/program.c new file mode 100644 index 0000000..b0eb4ea --- /dev/null +++ b/program.c @@ -0,0 +1,28 @@ +#include +#include +#include + +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++; + } + } + printf("%d",riad); + return 0; +} +