Programación de inversión digital
#incluye & ltstdio.h & gt
#incluye & ltstring.h & gt
#incluye & ltstdlib.h & gt
void main()
{
int a, b, c, d
char str[100]= { 0 }; >
char Shu[10]= { 0 };
for(a = 1; a & lt= 50;a++)
{
for(b = a+1;b & lt= 50;b++)
{
for(c = b+ 1;c & lt= 50;c++)
{
for(d = c+1; d & lt= 50;d++)
{
memset(str, 0, 100) ;
itoa(a, Shu, 10);
strcat(str, Shu
memset(shu, 0, 10); >
itoa(b, Shu, 10);
strcat(str, Shu
memset(shu, 0, 10); itoa(c, Shu, 10);
strcat(str, Shu);
memset(shu, 0, 10);
itoa(d, Shu, 10);
strcat(str, Shu);
if (atoi(str)%11 == 0)
{
memset(cadena, 0, 100);
itoa(d, Shu, 10);
strcat(cadena, Shu
memset); (shu, 0, 10);
itoa(c, shu, 10);
strcat(str, Shu
memset(shu, 0); , 10);
itoa(b, Shu, 10);
strcat(str, Shu
memset(shu, 0, 10);
itoa(a, Shu, 10);
strcat(str, Shu
if (atoi(str)%11 == 0)
{
printf("%d, %d, %d, %d\n ", a, b, c, d
}<); /p>
}
}
}
}
}
}