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 oops in programming?
How do you achieve polymorphism?
Templates mean
Can enum be null?
What is destructor in oop?
Is oop better than procedural?
What is the diamond problem in inheritance?
What are the data types in oop?
What is the example of polymorphism?
What is polymorphism oop?
Describe these concepts: Polymorphism, Inheritance and Abstraction.
Which type does string inherit from?
What is abstraction in oops with example?
What is the significance of classes in oop?
Which language is not a true object oriented programming language?