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 is a static member?
What is the basic structure of c++ program?
Difference between strdup and strcpy?
What is the full form nasa?
How a modifier is similar to mutator?
Which is the best c++ compiler?
What are virtual functions in c++?
How can I learn dev c++ programming?
What is a multiset c++?
How long it will take to learn c++?
How to allocate memory dynamically for a reference?
What is == in programming?
How do we implement inheritance in c++?
Declare a class vehicle and make it an abstract data type.
Is empty stack c++?