program to print this triangle
*
* *
* * *
Answer Posted / amit
/* Display Following Output
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
* * * * * * * * * * * */
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,r;
clrscr();
printf("\n\t Enter the raw number for Making Pyramind =>");
scanf("%d",&r);
printf("\n\n\n\n");
for(i=0;i<r;i++)
{
for(k=r;k>=i;k--)
{
printf(" ");
}
for(j=0;j<=i;j++)
{
printf(" *",i,j);
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 12 Yes | 7 No |
Post New Answer View All Answers
Why is polymorphism useful?
Why main function is special in c++?
Why c++ is faster than java?
Define a conversion constructor?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
Write syntax to define friend functions in C++.
Explain how to initialize a const member data.
How do I use arrays in c++?
What is ios :: in in c++?
Tell me can a pure virtual function have an implementation?
What are the benefits of c++?
What is the two main roles of operating system?
How do you establish an is-a relationship?
How to get the current position of the file pointer?
What is insertion sorting?