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
Is vector a class in c++?
What is nested class in c++?
Does improper inheritance have a potential to wreck a project?
Tell me what are static member functions?
What are c++ manipulators?
What is the identity function in c++? How is it useful?
What are the uses of static class data?
What is function declaration in c++ with example?
What is the cout in c++?
What is difference between n and endl in c++?
What is the c++ programming language used for?
What is an operator in c++?
Why we use #include conio h in c++?
Explain how the virtual base class is different from the conventional base classes of the opps.
Write a program to concatenate two strings.