write the code that display the format just like
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1
6 5 4 3 2 1

Answer Posted / bhushan

#include<iostream.h>
void main()
{
for(int i=1;i<=6;i++)
{
for(int j=i;j>=1;j--)
{
cout<<j<<"\t";
}
cout<<"\n";
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Show the declaration for a static function pointer.

580


Can we make copy constructor private in c++?

606


Eplain extern keyword?

567


Can you pass an array to a function in c++?

545


What is the sequence of destruction of local objects?

560






What do you mean by friend class & friend function in c++?

622


How to allocate memory dynamically for a reference?

546


Do vectors start at 0?

596


What do c++ programmers do?

558


Why main function is special in c++?

673


Why are pointers not used in c++?

628


How are virtual functions implemented in c++?

605


How do we implement inheritance in c++?

592


What is the prototype of printf function?

662


Why was c++ created?

560