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
What is the error in the code below and how should it be corrected?
What are the advantages of using a pointer?
What are structs in c++?
Can you sort a set c++?
What are features of c++?
Explain linked list using c++ with an example?
What is endl c++?
What is an object in c++?
What is the use of seekg in c++?
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
What is the difference between object-oriented programming and procedural programming?
Where are setjmp and longjmp used in c++?
What are friend classes?
Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?
Explain how to initialize a const member data.