From 7a139d235bf3be76df91eb9c539809324821885a Mon Sep 17 00:00:00 2001 From: Yurii Yakovenko Date: Mon, 30 Sep 2024 13:22:26 +0000 Subject: [PATCH] Update cv1/program.c --- cv1/program.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 69 insertions(+), 6 deletions(-) diff --git a/cv1/program.c b/cv1/program.c index 25296b2..544e001 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -1,7 +1,70 @@ -#include +#include +#include + +// i +void change(char* s) /// " ksdjfghkh \0" +{ + char shifer[85]="oizeasbtbq"; + // 012 + for(int i = 0; s[i]!='\0'; i++) + // умова виконання + { + //printf("%d ",i); + s[i]=tolower(s[i]); + if(s[i] >='0' && s[i]<='9') + { // '0'=>текс + + printf("\n%c ",s[i]); + s[i]=shifer[s[i]-'0']; + printf("\n%c > ",s[i]); + + } + } +} + + +// char x=69; // 'E => 'e' + +// . +// ABCDEFGH +// 01234 + +// if (s[i]== 'A') s[i]= 'a'; + +// x-'A' + 'a' 'R' => 'r' +// 65 97 +// s[i]=shifer[s[i]-'0'] + +// i => s[i] => +// 5 '2' z + +// 6 => s[6]='0' => 0 => shifr[0] => o +// 0 => s[0]='8' => 8 => shifr[8] => b +// 11 => s[11]='1' => 1 => shifr[1] => i + +// i +//nazva s: 8ryNd20va P1zza +// 0123456789011 + +int main() +{ // + // char shifer[85]="oizeasbtbq"; + char r[99]="8ryNd20va P1zza"; + char br[99]; + + scanf("%s", br); //jabl + + // do +// { + // punk cena; + // change(punkt); + // } + + printf("\n%s", r); + change(r); + printf("\n%s", r); + return 0; +} + + -int main(){ - printf("Hello World!!!!\n"); - printf("Dima is the best friend adn Lena is his gourgeus girlfriend!\n"); - return 0; -} \ No newline at end of file