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
What is the type of 'this' pointer? When does it get created?
Where and why do I have to put the "template" and "typename" keywords?
Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be
Does there exist any other function which can be used to convert an integer or a float to a string?
What is pure virtual function? Or what is abstract class?
Can you pass a vector to a function?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
What is time_t c++?
What is a singleton class c++?
How do you clear a map in c++?
What are the five basic elements of a c++ program?
Does c++ have finally?
What is data abstraction? How is it different from data encapsulation?
What is the maximum combined length of command line arguments including the space between adjacent arguments?
What are the restrictions apply to constructors and destructors?