From f12668a0cabe8575287e4c22d00ffe20b8e34045 Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Sat, 29 Feb 2020 18:23:39 +0100 Subject: [PATCH] 111 --- du1/program.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 du1/program.c diff --git a/du1/program.c b/du1/program.c new file mode 100644 index 0000000..a0b39e7 --- /dev/null +++ b/du1/program.c @@ -0,0 +1,28 @@ +nclude +#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; +} +