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 |
How can you link a c++ program to c functions?
Write syntax to define friend functions in C++.
What is size of Empty Class?
What is java and c++?
Why for local variables the memory required to hold the variable is allocated from the program stack and for new its allocated from the heap?
What is a c++ class?
What sorting algorithm does c++ use?
int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}
Write a function to find the nth item from the end of a linked list in a single pass.
What is class in c++ with example?
What is vector processing?
Evaulate: 22%5 a) 2 b) 4 c) 0