From 404f289c211eaad785ea3ee4eef5baa23d30fcb4 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Thu, 14 Jul 2022 17:17:27 +0000 Subject: [PATCH] Loop through all numbers. Co-authored-by: sigonasr2 --- current | Bin 16816 -> 16816 bytes src/main.c | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/current b/current index 20e5d6aaeaa3267ee9a3e49042045c62b45d5e7a..81a19100076fc78061f369655d668de17227ce9c 100755 GIT binary patch delta 882 zcmYL|e@IhN6vyw~B)2u&4=v52-Bpq+=G3&N;d0c=XJ{m83gI8Z779%zC)3dUzqqqQ@nn-e;A{ABdv$~w;#^(y}8r}^r4ZbMX^tkO=cceab zZieBe8X-QIVM(CECfzkgFzqzw;1U`!JGSNuTpSN^^Wx+1XA7R5SuW$^eGf-56ltcL zGItL|xacR?yLbsa5l&X-U%H35sNo(bixIizFJrto!;8;(G0cmvcyU^M$%~V60b}gK zg#XBzbdnENJkldHs zHp#|LI!1QkO1eO@H#;FSQR1tE055~tsL8s6Ly+F5M7RycLDiv*bt;cOU4sw-*ECoy z#2107I47u8Zxa#(=Zk)V<@ncN=NVn9V-o3XUs}9`0|oKAK~51$cQ|vexFpgZ#*48 qpeC0?>&!~3oV40ig&XO$atjT)jN1Qy$urk}ZHOdQAxV31MD-6qW+xT^ delta 805 zcmYL{e@IhN6vyw~M4h?bHjPascSnu+vQzGrY^hS@st_XFb}Zl+yW%u@8mXJtarEXv{WC z=Zpx^VY4vks0t~!EVDR?hQAOVv^lD~X{1?;$P0yXoL-}04O6U250La&rIEu>(6jhy zA~V5eU_ii((3rjhZDdUde#zz~xnVhuVFr6L`N@gZ*zbLETpBtrgc#HJKF3vCL4QPE zlyQHKER~mhLvs9R7ve6k3^)yJ0tSIq%R;;bR{jtI!8Lpa5@7F&5VgQX;1DnqA+C_^c!9@= z9k=r(vI}={tIM9%4hjS&Y#4!`A@Jke@7f`kzPaS^wc+VKFa z+Z12vb&Q|!*L(UP-B=dD7Cute2aVS9QGAm>EbnvKGjv6S62icba6lWfpjKNVjTEJE v?|2Hn%B?=H$pJ^#&B5z@0bIai`<*=MvzY!r>^WbBX@De}(12p99yR;}1``J# diff --git a/src/main.c b/src/main.c index 289d852..44491eb 100644 --- a/src/main.c +++ b/src/main.c @@ -55,10 +55,19 @@ int main(int argc,char**argv) { //printf("%s : %d",numberToString(numb1*numb2).str,numberToString(numb1*numb2).length); - - if (isPalindrome(numberToString(numb1*numb2))) { - printf("%d is a Palindrome!",numb1*numb2); + for (numb1=999;numb1>0;numb1--) { + for (numb2=999;numb2>0;numb2--) { + if (isPalindrome(numberToString(numb1*numb2))) { + printf("%d is a Palindrome!\n",numb1*numb2); + if (maxPal