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 / prasenjit roy
int main()
{
int i;
int j;
for(i = 1; i <= 6; i++)
{
for(j = i; j >= 1; j--)
cout<<j<<" ";
cout<<endl;
}
return 0;
}
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is lvalue?
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
What is the difference between #import and #include?
When does a 'this' pointer get created?
What is the identity function in c++? How is it useful?
Write a program to concatenate two strings.
What is diamond problem in c++?
Can constructor be static in c++?
What is the full form of dos?
State the difference between delete and delete[].
If dog is a friend of boy, is boy a friend of dog?
Please explain the reference variable in c++?
What do you mean by global variables?
When should overload new operator on a global basis or a class basis?
Can comments be longer than one line?