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
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
Is c++ double?
What is switch case in c++ syntax?
Is map ordered c++?
Can we sort map in c++?
What are the various operations performed on stack?
Define pure virtual function?
Explain the advantages of using friend classes.
Discussion on error handling of C++ .
What is the best c++ book for beginners?
What is the iunknown interface?
Which is most difficult programming language?
Why should you learn c++?
To which numbering system can the binary number 1101100100111100 be easily converted to?
What is lambda expression c++?