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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Answer / 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 |
Answer / suman_kotte
main()
{
int i,j;
for(i=1;i<=6;i++)
{
for(j=i;j>=1;j--)
printf("%d",j);
printf("\n");
}
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / kamal
int main()
{
cout<<"1\n2 1\n3 2 1\n4 3 2 1\n5 4 3 2 1\n6 5 4 3 2 1";
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
which is best institue to learn C/C++ IN AMEERPET OR MAITHRIVANAM OR SR NAGAR, PLEASE HELP. THANKS IN ADVANCE
Explain object slicing in c++?
What is the oldest programming language?
what is the emaning of '#include" "'?
Which of the Standard C++ casts can be used to perform a ?safe? downcast: a) reinterpret_cast b) dynamic_cast c) static_cast d) const_cast
What is a v-table?
What is realloc() and free()? What is difference between them?
What do nonglobal variables default to a) auto b) register c) static
What is c++ good for?
What are the various compound assignment operators in c++?
When we use Abstract Class and when we use Interface?where we will implement in real time?
implement stack using stack.h headerfile functions
1 Answers Exilant, GMG, Subex, University,