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
How do I write a c++ program?
What do you mean by const correctness?
What is difference between c++ 11 and c++ 14?
Explain the difference between struct and class in terms of access modifier.
How many types of classes are there in c++?
How one would use switch in a program?
Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .
Explain "const" reference arguments in function?
What do c++ programmers do?
What is the disadvantage of using a macro?
What are the four partitions in which c++ compiler divides the ram?
Explain the static storage classes in c++.
What is extern c++?
Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?
Is main a class in c++?