Environmental cue:
In some animals, the temperature at which fertilised eggs are kept determines whether the developing animal in egg is male or female. In some animals like snail, individual can change sex.
Genetical cue:
A child who inherits an X chromosome from the father will be a girl and one u,ho inherits a Y chromosome from the father u,ill be a boy.