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 are function pointers?
What is atoi in c++?
Explain function overloading
What is namespace & why it is used in c++?
Declare a class vehicle and make it an abstract data type.
What is an associative container in c++?
Is map thread safe c++?
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
Explain polymorphism?
What is protected inheritance?
What is buffering in c++?
Do the parentheses after the type name make a difference with new?
How we can differentiate between a pre and post increment operators during overloading?
What's the order in which the local objects are destructed?
If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?