Is a pineapple a fruit or vegetable?

Pineapple is a fruit (composite) as you eat the ripened ovary of the plant. Vegetables are considered "greens" where the leaves, stems or roots are consumed