program to print this triangle
*
* *
* * *
Answer Posted / prasenjit roy
void DrawStar(int Count)
{
int i,j;
for ( i = 1; i<=Count; i++ )
{
for ( j = i; j<Count ; j++ )
printf(" ");
for ( j = 1; j<=i; j++ )
printf("* ");
printf("\n");
}
}
int main(int argc, char* argv[])
{
DrawStar(3);
return 0;
}
| Is This Answer Correct ? | 40 Yes | 10 No |
Post New Answer View All Answers
Is there any difference between int [] a and int a [] in c++?
What is the use of object in c++?
program explaining feautures of c++
What are c++ tokens?
Explain the difference between c & c++?
What are built-in functions? What is the syntax for the definition?
Search for: what is pair in c++?
What do you mean by a template?
What do you mean by storage classes?
What is the full form of stl in c++?
What programming language should I learn first?
When should we use container classes instead of arrays?
What is the best it certification?
What is long in c++?
Can a program run without main?