void diamond(int n); // where n is the number of stars in the middle row. You can assume that n is odd.
(You can change the prototype of the function diamond)

If you post the code you have tried it will go a long way to getting faster help for your urgent homework.

i cannot be able to edit the post or post the code here!

ok

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.