firipu
Newbie level 4
i want to creat a new string with other alphabet order
for example instead of starting with a to start with r(order o 3)and end with abc
for example instead of starting with a to start with r(order o 3)and end with abc
Code:
int main(void)
{
char alf[]="abcdefghijklmnopqrstuvwxyz";
char ncifra[ALF];
int i,j,nchave;
printf("Chave (posicoes a transpor):");
scanf("%d",&nchave);
for(i=nchave;i<ALF;i++) {
j=0;
ncifra[j]=alf[i];
j++;
}
for(i=0;i<nchave;i++) {
j=26-nchave;
ncifra[j]=alf[i];
j++;
}
return 0;
}