~yani-kathy/marathon/compression

« back to all changes in this revision

Viewing changes to 3n+1/3n.cpp

  • Committer: Yanina Aular
  • Date: 2013-10-05 01:22:31 UTC
  • Revision ID: yanina.aular@vauxoo.com-20131005012231-yzp0qf1fp39hptkv

[IMP] siempre existira la ultima secuencia 4,2,1

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
            if(num[aux2] == -1){
34
34
                aux = aux2;
35
 
                i = 1;
36
 
                while( aux > 1 ){
 
35
                i = 3;
 
36
                while( aux > 4 ){
37
37
 
38
38
                    if( aux % 2 == 1  )
39
39
                        aux = aux*3 +1;