Dec 17, 2007 #1 F firipu Newbie level 4 Joined Oct 30, 2007 Messages 5 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,306 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 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; }
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 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; }