Friday, December 19, 2014

Write a Program to Print 12344321 123**321 12****21 1*******1

1 comment:

  1. #include
    using namespace std;

    int main()
    {
    int i, j, k, m;
    for(i=5; i>=1; i--)
    {
    for(j=1; j<=i; j++)
    cout << j;
    for(k=i; k < 5; k++)
    cout << "**";
    for(m=i; m>=1; m--)
    cout << m;
    cout << "\n";
    }
    return 0;
    }

    ReplyDelete