Exercise: Make a Diamond

Make a diamond using operators.

Problem statement

In this challenge, given an n≥1n \geq 1, you have to print a diamond of o's using the repetition operator x so that the middle row has 2n+12n+1 o's.

Sample input

Get hands-on with 1200+ tech skills courses.