The correct option is D ovaries and anterior pituitary
The menstrual cycle is controlled by various hormones produced by the hypothalamus, anterior pituitary and ovaries.
At the onset of puberty, GnRH (gonadotropin releasing hormone) is produced by the hypothalamus. GnRH acts on the anterior pituitary and stimulates the secretion of follicle stimulating hormone (FSH) and luteinising hormone (LH).
FSH acts on the ovaries and stimulates the growth and development of ovarian follicles. Under the influence of FSH, the follicles produce estrogen which helps in rebuilding the endometrium of the uterus.
Rapid secretion of LH induces the rupture of Graafian follicle and release of the secondary oocyte. The Graafian follicle transforms into corpus luteum. The corpus luteum secretes the hormone progesterone under the influence of LH.
Progesterone maintains endometrium of the uterus. The embryo gets implanted in the endometrium and hence progesterone is crucial for the establishment of pregnancy.
Hence, the hormones that regulate the menstrual cycle are secreted by both anterior pituitary and ovaries.