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 are constructors in oop?
What are oops methods?
What is abstraction with example?
What is class and object with example?
Is enum a class?
How do you achieve runtime polymorphism?
Why do we need polymorphism in c#?
What do you mean by variable?
Why do we use encapsulation in oops?
Why do we use class?
What is inheritance and how many types of inheritance?
What is oops and its features?
What do you mean by overloading?
Please send ford technologies placement paper 2 my mail id
Why is there no multiple inheritance?