#include
#include
int f=0,e=0,u,ctp[50],cnp[50];
void rule(char *x[],char *y[]);
void s1 (char *o[],char *p[]);
void s2 (char *m[],char *n[]);
void s3 (char *j[],char *k[]);
int main (void)
{
char *p[50],*s[50],temp,x='\o';
int i=0,type;
printf("Direction: \nEnter a string of secret words that include numbers and words, \nwhich both less than 50. \nAnd end with Enter:\n");
while((temp=getchar())!='\n')
{
if('0'<=temp&&temp<='9')
{
p[f]=&temp;
cnp[f]=i+1;
f++;
}
else
{
s[e]=&temp;
ctp[e]=i+1;
e++;
}
i++;
}
p[f+1]=&x;
s[e+1]=&x;
u=e+f;
for(i=0;i<f;i++)
{
printf("%c",&p[i]);
}
/* printf("[1]:simple encryprion.\n[2]:advanced encryption.\n[3]:Limited encryption.\nEnter the type of the encryption you choose:");
scanf("%d",&type);
if(type==1)
s1 (p,s);
else if(type==2)
s2 (p,s);
else if(type==3)
s3 (p,s);*/
return 0;
}
/*void s1 (char *o[],char *p[])
{
int i;
char tempn,tempt;
for(i=0;i++;i<=f/2)
{
o[i]=&tempn;
o[i]=o[f-i];
o[f-i]=&tempn;
}
for(i=0;i++;i<=e/2)
{
p[i]=&tempt;
p[i]=p[e-i];
p[e-i]=&tempt;
}
rule(o,p);
}
void s2 (char *m[],char *n[])
{
int x,i,q;
char y,z[1];
for(i=0;i<f;i++)
{
q=atoi(m[i]);
x=q*2+4;
itoa(x,z,10);
m[i]=&z[0];
}
for(i=0;i<e;i++)
{
y=*n[i]-'A'+'a';
n[i]=&y;
}
s1 (m,n);
}
void s3 (char *j[],char *k[])
{
int p,i,a,c;
char b[1],d[1],v;
printf("Enter the appointed number(long=1)");
scanf("%d",&p);
for(i=0;i<f/2;i++)
{
a=atoi(j[2*i+1]);
a=a*p;
itoa(a,b,10);
j[2*i+1]=&b[0];
}
for(i=0;i<f/2;i++)
{
c=atoi(j[2*i]);
c=c*p;
itoa(c,d,10);
j[2*i]=&d[0];
}
for(i=0;i<e;i++)
{
if((*k[i]-'z')>13)
{
v=*k[i]-p;
k[i]=&v;
}
else if(0<*k[i]-'z'<13)
{
v=*k[i]+p;
k[i]=&v;
}
else if(*k[i]-'a'>13)
{
v=*k[i]-p;
k[i]=&v;
}
else if(0<*k[i]-'a'<13)
{
v=*k[i]+p;
k[i]=&v;
}
}
rule(j,k);
}
void rule(char *x[],char *y[])
{
int e=0,r=0,i;
for(i=0;i<u;i++)
if(cnp[i]==i+1)
{
printf("%c",*x[i-r]);
e++;
}
else if(ctp[i]==i+1)
{
printf("%c",*y[i-e]);
r++;
}
} */
#include
int f=0,e=0,u,ctp[50],cnp[50];
void rule(char *x[],char *y[]);
void s1 (char *o[],char *p[]);
void s2 (char *m[],char *n[]);
void s3 (char *j[],char *k[]);
int main (void)
{
char *p[50],*s[50],temp,x='\o';
int i=0,type;
printf("Direction: \nEnter a string of secret words that include numbers and words, \nwhich both less than 50. \nAnd end with Enter:\n");
while((temp=getchar())!='\n')
{
if('0'<=temp&&temp<='9')
{
p[f]=&temp;
cnp[f]=i+1;
f++;