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 abstraction in c++ with example?
What do you mean by late binding?
Can c++ do everything c can?
Explain the difference between using macro and inline functions?
Is std :: string immutable?
What is the history of c++?
How would you use qsort() function to sort an array of structures?
What does int * mean in c++?
Is there any difference between int [] a and int a [] in c++?
What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0
Define stacks. Provide an example where they are useful.
What is a memory leak c++?
How does c++ sort work?
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;
What is difference between c++ and c ++ 14?