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 |
Write a program to reverse a linked list?
8 Answers Catalytic Software, Satyam,
What is the latest c++ version?
What do you understand by zombie objects in c++?
Is arr and &arr are same expression for an array?
Hi i need to Acess a variable "int Intval" in the below mentioned code .How to Access it guys i am waiting for your reply
What is the best c c++ compiler for windows?
What is c++ map?
List the types of polymorphism in c++?
How do you define a class in c++?
What C++ libraries are you proficient with?
Explain the benefits of proper inheritance.
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?