Sega Posted September 6, 2011 Report Share Posted September 6, 2011 (edited) Am facut un programel in C++ dupa challenge-ul lui @Sulea si anume ACESTACRIPTAREExemplu: PALD1) P e consoana : P+4=T2) A e vocala : A+4=E; E+10=O; se insereaza in string, si tot ce se afla dupa O se incrementeaza cu 1;avem: TEOme3)M e consoana : M+4=Q;4)E e vocala : E+4=I; I+10=S;Rezultat final: TEOQISDECRIPTAREAvem nevoie de un vector in care sa pastram pozitiile pt. decrementare.Luam vectorul vec[333];Exemplu: TEOQIS1)T-4=P; P e cons deci ramane asa, avem p2)E-4=A; A e vocala => stergem urmatoarea litera si ramane paQIS si pastram pozitia curenta in i=0 vec=2; i++;3)Q-4=M; avem: pamIS4)I-4=E; E e voc stergem urmatoarea litera si ramane PAMEla final in vec=lungimea noului string adica 4Si acum de la vec[0] la vec[1]: adica de la 2 la 4 decrementam cu 1; paME => paLDSper ca am fost explicit. Daca aveti o alta idee postati aici va rog.Sursa DOWNLOAD:MediaFire2SharedGirlShareProgram DOWNLOAD:MediaFire2SharedGirlShare Edited September 6, 2011 by Sega 1 Quote Link to comment Share on other sites More sharing options...
totti93 Posted September 6, 2011 Report Share Posted September 6, 2011 crypt("PAND") = "teoscj"Sunt obosit:-?? Cred ca e de incrementarea la vocale... Quote Link to comment Share on other sites More sharing options...
Sega Posted September 6, 2011 Author Report Share Posted September 6, 2011 (edited) crypt("PAND") = "teoscj"Sunt obosit:-?? Cred ca e de incrementarea la vocale...Am gresit explicatia de la inceput: dupa N nu vine M ci O Exemplu era cu PALD (am modificat).Ms de observatie. Edited September 6, 2011 by Sega Quote Link to comment Share on other sites More sharing options...
totti93 Posted September 6, 2011 Report Share Posted September 6, 2011 Asa da! Acum am observat si eu unde ai gresit Cu placere! Quote Link to comment Share on other sites More sharing options...
cmiN Posted September 7, 2011 Report Share Posted September 7, 2011 Esti boss [C++] decriptare3 - Pastebin.com . Quote Link to comment Share on other sites More sharing options...