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
What is rtti in c++?
What is a tree in c++?
What is the error in the code below and how should it be corrected?
Can you explicitly call a destructor on a local variable?
What are the types of container classes?
Const char *p , char const *p What is the difference between the above two?
What is c++ map?
Is facebook written in c++?
What is the best c++ book for beginners?
What is the use of data hiding?
Why is c++ awesome?
What is the type of this pointer in c++?
What is a wchar_t in c++?
How java is different from c and c++?
What is encapsulation in C++? Give an example.