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
Who invented turbo c++?
What is difference between rand () and srand ()?
What is a block in c++?
What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?
Define a nested class.
Can a Structure contain a Pointer to itself?
Comment on c++ standard exceptions?
What is the use of 'this' pointer?
Specify some guidelines that should be followed while overloading operators?
Explain how we implement exception handling in c++?
What are the c++ access specifiers?
What is type of 'this' pointer? Explain when it is get created?
Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.
What is :: operator in c++?
Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list