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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ramesh.bugatha78
for(int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++)
cout<<j;
cout<<"\n";
}
| Is This Answer Correct ? | 8 Yes | 0 No |
If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?
Is c++ still in demand?
What are the benefits of c++?
How is new() different from malloc()?
What is abstraction in c++?
Specify some guidelines that should be followed while overloading operators?
Do you know what is overriding?
Explain mutable storage class specifier.
what are difference between c and c++?
What is virtual constructor paradigm?
Explain linked list using c++ with an example?
What is a terminating character in c++?