Amdocs interview question

Make pattern or triangle and diamond in c++