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
In a function declaration what does extern means?
What is a .lib file in c++?
Write a program to show polymorphism in C++?
I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
What does the linker do?
Can notepad ++ run c++?
If a function doesn’t return a value, how do you declare the function?
Explain how to initialize a const data member.
what is pre-processor in C++?
Do vectors start at 0 c++?
What is an undefined reference/unresolved external symbol error and how do I fix it?
Which compiler does turbo c++ use?
why is iostream::eof inside a loop condition considered wrong?
What programming language should I learn first?