From a2371a5c8b5af2885012a8cf18a224d7efbb7a2d Mon Sep 17 00:00:00 2001 From: Mykyta Sadchenko Date: Tue, 20 Feb 2024 23:29:37 +0100 Subject: [PATCH] funguje --- cv1/program.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 cv1/program.c diff --git a/cv1/program.c b/cv1/program.c new file mode 100644 index 0000000..9b66871 --- /dev/null +++ b/cv1/program.c @@ -0,0 +1,29 @@ +#include + + + +int main(){ + +printf("Enter the text, please: "); + +int c; +while(( c = getchar()) != EOF){ +if( c >= 'a' && c <= 'z'){ + c = c - 32; +}else if( c >= 'A' && c <= 'Z'){ + c = c + 32; +} + if(c != '\n'){ + if(c >= 32 && c <=126){ + putchar(c); + } + }else{ + putchar('\n'); + } + +} + + return 0; +} + +