Created
April 5, 2016 09:51
-
-
Save alonzoibarra97/e416424491f26cbb701698949fb5e729 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "BigIntegerLibrary.hh" | |
using namespace std; | |
int palindromos=0,nly=0, ly=0; | |
BigInteger s; | |
BigInteger reves (int num ){ | |
int volt=0; | |
while(num>0) | |
{ | |
volt= volt*10 + num%10; | |
num= num/10; | |
} | |
cout<<volt; | |
return volt; | |
} | |
int tipo (BigInteger numero) | |
{ | |
int nume1, dvo, cont=0; | |
do{ | |
s = reves(numero) + numero; | |
numero= s; | |
cont++; | |
}while(s!= reves(s)||cont<=30); | |
if (cont ==1) | |
{ return 1; | |
palindromos++; | |
} | |
else{ | |
if(cont>1&& cont<30) | |
{ | |
return 2; | |
nly++; | |
} | |
else{ | |
return 3; | |
ly++; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment