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 / gayatri chhotray
int main()
{
int i;
int j;
for(i = 1; i <= 6; i++)
{
for(j = i; j >= 1; j--)
{
cout<<j<<" ";
}
}
return 0;
}
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What are the benefits of pointers?
Is c++ platform dependent?
If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3
Can we specify variable field width in a scanf() format string? If possible how?
What is the difference between new() and malloc()?
Name four predefined macros.
How a new operator differs from the operator new?
What is the object serialization?
What is the advantage of an external iterator.
What are move semantics?
What is the need of a destructor?
Can java be faster than c++?
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
Why do we use classes in c++?
How is modularity introduced in C++?