{"id":38454,"date":"2016-05-12T17:06:18","date_gmt":"2016-05-12T22:06:18","guid":{"rendered":"http:\/\/perape.wordpress.com\/?p=133"},"modified":"2016-05-12T18:00:40","modified_gmt":"2016-05-12T23:00:40","slug":"wsq12-10","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2016\/2016\/05\/wsq12-10\/","title":{"rendered":"#WSQ12"},"content":{"rendered":"<p>#include &#8220;BigIntegerLibrary.hh&#8221;<br \/>\n#include &lt;iostream&gt;<br \/>\n#include &lt;string&gt;<br \/>\nusing namespace std;<\/p>\n<p>BigInteger lychrel (BigInteger x){<\/p>\n<p>string z = bigIntegerToString(x);<br \/>\nlychrel(z.begin(), z.end());<br \/>\nBigInteger lychrel = stringToBigInteger(z);<br \/>\nreturn lychrel;<br \/>\n}<\/p>\n<p>int main() {<br \/>\nint inferior,superior, p, k, number, a=0;<br \/>\nint f=0, n=0;<br \/>\nBigInteger y, c=0, suma=0;<\/p>\n<p>cout &lt;&lt; &#8220;Dame el limite inferior&#8221;;<br \/>\ncin&gt;&gt;inferior;<\/p>\n<p>cout&lt;&lt; &#8220;Dame el limite superior&#8221;;<br \/>\ncin&gt;&gt;superior;<\/p>\n<p>for(c=inferior; c&lt;=superior; c++){<br \/>\nfor(BigInteger m=count; m&lt;=count;m++){<\/p>\n<p>y= lychrel(m); suma=y+c;}<\/p>\n<p>if(c==y) {<br \/>\nn=n+1;<br \/>\n} else {<br \/>\nint times= 0;<\/p>\n<p>BigInteger numero = c;<br \/>\ny=lychrel(numero);<\/p>\n<p>while(times&lt;30 &amp;&amp; numero!=y){<\/p>\n<p>number = numero+y;<br \/>\ny = lychrel(numero);<br \/>\ntimes = times+1;<br \/>\n}<br \/>\nif(times &lt; 30){<br \/>\na = a+1;<br \/>\n} else {<br \/>\ncout &lt;&lt; &#8220;Lychrel found &#8221; &lt;&lt;c&lt;&lt; endl;<br \/>\nf = f+1;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>cout &lt;&lt;&#8220;The palindrom is: &#8221; &lt;&lt; n &lt;&lt;endl;<br \/>\ncout&lt;&lt;&#8220;Non lychrel become palindrom in one interacion: &#8220;&lt;&lt;a&lt;&lt;endl;<br \/>\ncout&lt;&lt;&#8220;The lychrel is: &#8220;&lt;&lt;f&lt;&lt;endl;<\/p>\n<p>return 0;<br \/>\n}<\/p>\n<p>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/perape.wordpress.com\/133\/\"><img decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/05\/79eb3c516360174d480f3416eb755e1a.jpg\" \/><\/a> <img loading=\"lazy\" decoding=\"async\" alt=\"\" border=\"0\" src=\"http:\/\/kenscourses.com\/tc101winter2016\/wp-content\/uploads\/2016\/05\/1ecf9ecbbb2a589503ea7e9d5898076b.jpg#038;blog=105581261&#038;%23038;post=133&#038;%23038;subd=perape&#038;%23038;ref=&#038;%23038;feed=1\" width=\"1\" height=\"1\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>#include &#8220;BigIntegerLibrary.hh&#8221; #include &lt;iostream&gt; #include &lt;string&gt; using namespace std; BigInteger lychrel (BigInteger x){ string z = bigIntegerToString(x); lychrel(z.begin(), z.end()); BigInteger lychrel = stringToBigInteger(z); return lychrel; } int main() { int inferior,superior, p, k, number, a=0; int f=0, n=0; BigInteger y, c=0, suma=0; cout &lt;&lt; &#8220;Dame el limite inferior&#8221;; cin&gt;&gt;inferior; cout&lt;&lt; &#8220;Dame el limite superior&#8221;; cin&gt;&gt;superior; &hellip; <a href=\"https:\/\/kenscourses.com\/tc101winter2016\/2016\/05\/wsq12-10\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">#WSQ12<\/span><\/a><\/p>\n","protected":false},"author":51,"featured_media":38455,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[25,226],"class_list":["post-38454","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-uncategorized","tag-wsq12"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/38454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/users\/51"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/comments?post=38454"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/38454\/revisions"}],"predecessor-version":[{"id":38459,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/posts\/38454\/revisions\/38459"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media\/38455"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/media?parent=38454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/categories?post=38454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2016\/wp-json\/wp\/v2\/tags?post=38454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}