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
What is data hiding c++?
What is meant by entry controlled loop?
What is a local variable?
How a pointer differs from a reference?
What does the linker do?
If there are two catch statements, one for base and one for derived, which should come first?
What is the difference between delegation and implemented-in-terms-of?
Should I learn c or c++ or c#?
write a function signature with various number of parameters.
What is rvalue?
Show the application of a dynamic array with the help of an example.
What is c++ programming language?
What is input operator in c++?
Explain unexpected() function?
Why the usage of pointers in C++ is not recommended ?