hello friends i need help in c++ programe i want to print the diamond of the type shown in picture any one help me in this regards............................

if possible then send me email at <snipped email>

Recommended Answers

All 5 Replies

cout << "    *    " << endl;
cout << "  * * *  " << endl;
cout << "* * * * *" << endl;
cout << "  * * *  " << endl;
cout << "    *    " << endl;

Hmm, not bad, but according to the OP's drawing could it not be something like this?

cout << "       /|\\ " << endl;
    cout << "      / | \\ " << endl;
    cout << "     / *|* \\ " << endl;
    cout << "    / * | * \\ " << endl;
    cout << "   / * *|* * \\ " << endl;
    cout << "  / * * | * * \\ " << endl;
    cout << " / * * *|* * * \\ " << endl;
    cout << "< * * * | * * * >" << endl;
    cout << " \\ * * *|* * * / " << endl;
    cout << "  \\ * * | * * / " << endl;
    cout << "   \\ * *|* * / " << endl;
    cout << "    \\ * | * / " << endl;
    cout << "     \\ *|* / " << endl;
    cout << "      \\ | / " << endl;
    cout << "       \\|/ " << endl;

you should use loop instead of large cout

@basit_3: We know..., you should read between the lines. :)

oh i see thankx

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.