HOW TO WRITE A PROGRAM IN C

to print the following pattern:
3
323
32123
323
3

kes166 commented: Don't do homework unless you show some thought +0

This is c++ forum, not C.

Here is one way to do it, but I doubt that is that you really want.

int main()
{
   cout << 3 << '\n';
   cout << 323 << '\n';
   cout << 32123 << '\n';
   cout << 323 << '\n';
   cout << 3 << '\n';
}
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.