program to print this triangle
*
* *
* * *
Answer Posted / mayank murari
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k;
for(i=1;i<4;i++)
{
for(j=4;j>=i;j--)
{
printf(" ");
}
for(k=1;k<2*i;k++)
{
printf("*");
}
printf("\n");
}
getch();
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Can you write a function similar to printf()?
Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h
Which software is used to run c++ program?
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
Difference between pass by value and pass by reference?
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
What is pure virtual function?
What is near, far and huge pointers? How many bytes are occupied by them?
Why do we use pointers in c++?
What is void pointer in c++ with example?
How would you obtain segment and offset addresses from a far address of a memory location?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
What is stoi in c++?
Explain the difference between new() and malloc() in c++?
How can you differentiate between inheritance and implementation in c++?