write a c++ program that gives output
4
3 4
2 3 4
1 2 3 4 using looping statement
Answer Posted / rajesh
This answer is to print :
4342341234
#include<stdio.h>
int main()
{
int i, space, num, n=4;
for(i=1; i<=n; i++)
{
for(space=1; space<=n-i; space++)
{
}
for(num=space; num<=n; num++)
{
printf("%d",num);
}
}
printf("\n");
}
| Is This Answer Correct ? | 13 Yes | 3 No |
Post New Answer View All Answers
What is a singleton c++?
What is a dangling pointer in c++?
Is overriding possible in c++?
What is meant by entry controlled loop? What all C++ loops are exit controlled?
What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?
List the special characteristics of constructor.
What is the operator in c++?
Write my own zero-argument manipulator that should work same as hex?
What is function prototyping? What are its advantages?
How a modifier is similar to mutator?
What is fflush c++?
What are static type checking?
Is c++ fully object oriented?
Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers
Can I learn c++ as my first language?