program to print this triangle
*
* *
* * *
Answer Posted / vivek kumar
#include <stdio.h>
#define MAX 6
int main()
{
int i, j,k;
for(i = 0; i < MAX; i++)
{
for(j = 0; j < MAX-1-i; j++)
printf("\t");
if(i == 0)
printf("*\t");
else
for(k = 0; k < i*2+1; k++)
printf("*\t");
printf("\n");
}
return 0;
}
| Is This Answer Correct ? | 12 Yes | 5 No |
Post New Answer View All Answers
What is DlgProc?
program explaining feautures of c++
Write about the local class and mention its use?
What does new do in c++?
Why do we use the using declaration?
What does it mean to declare a member function as virtual?
When are exception objects created?
What is the difference between an external iterator and an internal iterator?
What is the c++ code?
Explain what is oop?
Explain container class.
In what situations do you have to use initialization list rather than assignment in constructors?
Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h
What does extern mean in a function declaration in c++?
What are built-in functions? What is the syntax for the definition?