how to find value of (3^6)+(a^a)?

pls help me to find out the value of
int a=(3^6)+(a^a);
printf("%d",a);
Are you trying to resolve the value of a in the equation
a = 729 + aa
?
Very interesting, is this even possible ?

EDIT : I can only think of make "a" static and initialize it.Once you have a value for it the assignment will be meaningful.
Last edited on
is this as simple as:
1
2
int a = rand();
a = pow(3,6)+pow(a,a);


if you don't have int pow(int , int) available, it's easy to write a version.
If you want to calculate an expression as if it was:
int x=(3^6)+(a^a); use what @Stewbond proposed.

If on the other hand you want to solve an equation like this:
int a=(3^6)+(a^a); in the mathematical sense (not C assignment sense) which makes it equivalent to (3^6)+(a^a)-a=0; then I guess you ll have to use an arithmetic method to approximate a numerical solution.

I guess you meant the former but it's not really clear so I referred both cases that come to my mind.
Topic archived. No new replies allowed.