diff --git a/zz4.cpp b/zz4.cpp new file mode 100644 index 0000000..02d5957 --- /dev/null +++ b/zz4.cpp @@ -0,0 +1,46 @@ +#include +/********** Begin **********/ +void change(char *string,int d[],int l,int n4) +{ + int x=0,z=l; + char temp; + for(x=0;x=1;l--) + { + *(string+d[l])=*(string+d[l-1]); + } + *(string+d[0])=temp; + } +} +void Dec(char *str,int n1,int n2,int n3) +{ + int i=0,j=0,k=0,n=0;//,x=0,y=0,z=0,temp; + int a[50],b[50],c[50]; + while(*str!='\0') + { + if (*str>= 'a' && *str<= 'i') + { + a[i++]=n; + } + else if (*str>= 'j' && *str<= 'r') + { + b[j++]=n; + } + else if ((*str>='s' && *str<='z')||*str=='_') + { + c[k++]=n; + } + n++; + str++; + } + i--;j--;k--; + str=str-n; + change(str,a,i,n1); + change(str,b,j,n2); + change(str,c,k,n3); + printf("%s\n",str); +} +/********** End **********/