i want code of diomand program..you know a code that give us this:
1
123
12345
123
1

That's easy!

#include <iostream>

int main() {
    std::cout << "1\n123\n12345\n123\n1";
}

Next question.

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.