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
Can I learn c++ in a week?
Describe the syntax of single inheritance in C++?
Does c++ support exception handling?
Can I create my own functions in c++?
Write my own zero-argument manipulator that should work same as hex?
What is the difference between a type-specific template friend class and a general template friend class?
How many types of comments are there in c++?
How to declaring variables in c++?
What's c++ used for?
What does scope resolution operator do?
Implement stack operations with pointers with appropriate exception checks.
Where the memory to the static variables is allocated?
Is C++ case sensitive a) False b) Depends on implementation c) True
Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c
Is c++ double?