In your code
if (age1==age2==age3);
is horribly broken.
Two main points,
An expression like age1==age2==age3
is either
0 == age3
, when age1 != age2
1 == age3
, when age1 == age2
none of which is you want.
The ;
at the end of the if
statement makes the next block unconditional.
At best, you can rewrite the same as
if ( ( age1 == age2 ) && ( age2 == age3) ) { .... }
After that, in case of
printf("All individuals have the same age of %d", &age1);
you don't need to pass the address-of the variable. This, in fact makes the statement very wrong, passing an incompatible type of argument to a supplied conversion specifier, which causes undefined behavior.