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 does std :: flush do?
What is a template in c++?
Tell me difference between constant pointer and pointer to a constant.
What is a namespace in c++?
What is a c++ map?
What is the full form of dos?
What is the use of function pointer?
What are activex and ole?
What does it mean to declare a destructor as static?
Explain the scope of resolution operator.
Can you use the function fprintf() to display the output on the screen?
What is const in c++?
List the special characteristics of constructor.
If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?
Which should be more useful: the protected and public virtuals?