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
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
When there is a global variable and local variable with the same name, how will you access the global variable?
Explain operator overloading.
What is implicit pointer in c++?
Can c++ be faster than c?
Is there any function that can skip certain number of characters present in the input stream?
What is the use of ::(scope resolution operator)?
What is an iterator?
Why c++ is not a pure oop language?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
Can we use pointers in c++?
What is linked list in c++?
What is a float in c++?
What is c++ best used for?
Is linux written in c or c++?