answersLogoWhite

0

#include <stdio.h>

main (int argc, char **argv)

{

long inx, num, n, ns, r1, r2;

num = atol(argv[1]);

printf("num=%ld\n", num);

for (inx = 1; inx < num; inx++)

{

n = inx;

ns = n*n;

while (n > 0)

{

r1 = n%10;

r2 = ns%10;

if (r1 != r2) break;

n = n/10;

ns = ns/10;

}

if (n == 0)

{

printf("%ld is automorphic\n", inx);

}

}

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

A program c plus plus on automorphic numbers or not?

how to write a program that counts automorphic number from 1 to 999


How print the string with double cot in c plus plus language?

console.wrikerle("""");


C plus plus program to print number patterns?

bghjg


How do you output multiple 's on a single line in c plus plus programming language?

its supposed to have an asterisk there before the 's but it wouldnt print it


Plus 1 blue print for chemistry?

i want plus 1 blue print for all subjects


How do you print to the screen in C plus plus?

printf();


Write a C plus plus function that print a triangle of stars?

Write a function that print a triangle of stars.


What is the use of print option in c plus plus?

C++ has no print option. The print option in your IDE allows you to print your C++ source code, thus giving you a "hard" copy of your code.


Is there a difference between you plus plus and plus plus you?

you++ will return the current value of you and increment it. ++you will increment it and then return the new value of you. So, for example: int you = 0; cout &lt;&lt; you++; // this will print 0 cout &lt;&lt; you; // this will print 1 int you = 0; cout &lt;&lt; ++you; // this will print 1 cout &lt;&lt; you; // this will also print 1


Do I need a C plus plus program to print PASCAL's triangle?

No.


Write a program in C plus plus language that will receive two numbers from the user and print out a multiplication table?

A multiplication table requires more than two numbers so I'll assume you really meant to say print the product of the two numbers. #include &lt;iostream.h&gt; int main{ int x, y; cout &lt;&lt; "Please enter the 1st number: "; cin &gt;&gt; x; cout &lt;&lt; "Please enter the 2nd number: "; cin &gt;&gt; y; cout &lt;&lt; "The product is: " &lt;&lt; x * y; return 0; };


When was Plus - programming language - created?

Plus - programming language - was created in 1976.