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 |
Explain the difference between overloading and overriding?
What is the iunknown interface?
What are c++ variables?
Do vectors start at 0 c++?
What is a smart pointer?
what is data Abstraction
what is the size of a class which contains no member variables but has two objects??? is it 1 or 2??
Can we specify variable field width in a scanf() format string? If possible how?
What are the main differences between C and C++?
What is a memory leak c++?
the maximum length of a character constant can be a) 2 b) 1 c) 8
Explain the extern storage classes in c++.