From 8677defd3fc18afc3f05ec6e7df15b47d959fce6 Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Sun, 20 Feb 2022 13:26:50 +0100 Subject: [PATCH] 123 --- du1/program.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/du1/program.c b/du1/program.c index 50e41c6..0a94a8b 100644 --- a/du1/program.c +++ b/du1/program.c @@ -2,9 +2,19 @@ int main(){ int c = 1; - printf("Enter your text\n"); + char small[] = "abcdefghijklmnopqrstuvwxyz"; + char big[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; while(c = 1){ c = getchar(); + for(int i = 0; i < 26; i++){ + if(c == small[i]){ + c = big[i]; + break; + }else if(c == big[i]){ + c = small[i]; + break; + } + } } return 0; }