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");
for(k = 0; k < i*2+1; k++)
printf("*\t");
printf("\n");
}
return 0;
}
| Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
How does com provide language transparency?
What is c++ iterator?
Can we distribute function templates and class templates in object libraries?
total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.
what are the types of Member Functions?
What are default parameters? How are they evaluated in c++ function?
What is heap sort in c++?
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?
Is c++ faster than c?
What is recursion?
Is c++ a software?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
What do nonglobal variables default to a) auto b) register c) static
What are the benefits of c++?
Explain the benefits of proper inheritance.