Write a program to accept a number and to print numbers in
pyramid format?
for eg:for a no. 5
1
212
32123
4321234
543212345
Answer Posted / akshaya
#include <iostream.h>
#include<conio.h>
void main()
{
int i,n,j;
clrscr();
cout<<"
Enter the value of n:";
cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
cout<<" ";
}
}
}
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What is advantage of inheritance?
Where You Can Use Interface in your Project
What is polymorphism programming?
Why is destructor used?
Can we create object of abstract class?
What is polymorphism used for?
What are different oops concepts?
What does I oop mean?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
What is a function in oop?
What is the real time example of encapsulation?
What is the important feature of inheritance?
write a program to find 2^n+1 ?
What is destructor example?
Advantage and disadvantage of routing in telecom sector