write a c++ program that gives output
4
3 4
2 3 4
1 2 3 4 using looping statement
Answer Posted / rajesh
4
3 4
2 3 4
1 2 3 4
#include<stdio.h>
int main()
{
int i, j, n=4;
for(i=n; i>=1; i--)
{
for(j=i; j<=n; j++)
{
printf("%d",j);
}
printf("\n");
}
printf("\n");
}
| Is This Answer Correct ? | 32 Yes | 1 No |
Post New Answer View All Answers
Explain bubble sorting.
Explain public, protected, private in c++?
Why can templates only be implemented in the header file?
What is the type of 'this' pointer? When does it get created?
What are the important differences between c++ and java?
What is meaning of in c++?
Describe new operator?
Define Virtual function in C++.
How can an improvement in the quality of software be done by try/catch/throw?
What is binary object model?
What are the rules for naming an identifier?
What do nonglobal variables default to a) auto b) register c) static
What do you mean by stack unwinding in c++?
Explain what happens when a pointer is deleted twice?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?