编程知识 cdmana.com

Array palindromes array palindromes

A six digit number multiplied by a number of digits , The result is the original six digit palindrome number .(abcdef*x=fedcba)
How to write all in arrays




Refer to the answer 1:

The code is as follows : If help , Please help me adopt , thank you .

#include <stdio.h>int main(){    int i,j,t,s;    for (i=100000;i<=999999;i++)    {        s = 0;        for (j=1;j<=9;j++)        {            t = i*j;            while(t)            {                s = s*10 + t%10;                t/=10;            }            if(s == i) printf("i=%d,j=%d\n",i,j);        }    }    return 0;}



Refer to the answer 2:

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/10/20211025102037728i.html

Scroll to Top