write a c++ program that gives output
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
using looping statement
Answer Posted / akhil
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,n;
cout<<"enter limit";
cin>>n;
for(i=1;i<=n;i++)
//cout<<"/n"; for printing line by line
for(j=1;j<=i;j++)
cout<<j;//
getch();
}
| Is This Answer Correct ? | 18 Yes | 1 No |
Post New Answer View All Answers
What's the most powerful programming language?
What are the basic data types used in c++?
Can manipulators fall in love?
Why is null pointer used?
What is iterator in c++?
What is setiosflags c++?
What is the use of volatile variable?
What is data binding in c++?
What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?
Can you explicitly call a destructor on a local variable?
Who calls main function?
what is multi-threading in C++?
Explain the benefits of proper inheritance.
State the difference between delete and delete[].
Can comments be longer than one line?