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 setbase c++?
What is the use of endl?
What is the use of string in c++?
Where is atoi defined?
What is a virtual destructor? Explain the use of it?
How does a copy constructor differs from an overloaded assignment operator?
What is the array and initializing arrays in c++?
Explain the static storage classes in c++.
Explain class invariant.
What is the difference between #import and #include in c++?
What are c++ variables?
What is an associative container in c++?
Explain dangling pointer.
Is empty stack c++?
What is prototype in c++ with example?