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
an operation between an integer and real always yeilds a) integer result b) real result c) float result
How can you say that a template is better than a base class?
What is a loop? What are different types of loops in c++?
Specify different types of decision control statements?
What is basic if statement syntax?
What is the use of typedef?
Tell me what are static member functions?
What is c++ best used for?
How do I get good at c++ programming?
When there is a global variable and local variable with the same name, how will you access the global variable?
What is singleton pattern in c++?
What does namespace mean in c++?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
What is a class template in c++?
What is the header file for setw?