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
How do you establish a has-a relationship?
Define the operators that can be used with a pointer.
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
Why do we need c++?
Write a Program to find the largest of 4 no using macros.
How to declare an array of pointers to integer?
Is recursion allowed in inline functions?
Define vptr.
What is the most powerful coding language?
What is a storage class?
Why do we use classes in programming?
Is c++ the hardest language?
Will this c++ program execute or not?
Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
What is the difference between prefix and postfix versions of operator++()?