Interview Air interview question

To output a pattern using c/c++/java/python