program to print this triangle
*
* *
* * *

Answer Posted / vivek

!Program is executable in C++

#include<iostream.h>
#include<conio.h>
void main()
{
int i,j;
for(i=0;i<3;++i)
{
for(j=0;j<i;++j)
cout<<"* ";
cout<<"\n";
}
getch();
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.

1955


What is a base class?

805


How can you quickly find the number of elements stored in a dynamic array?

797


Why do we use double in c++?

804


Can I make ios apps with c++?

765


What is the use of bit fields in structure declaration?

736


Is c++ still in demand?

871


In a function declaration, what does extern mean?

813


Write about the members that a derived class can add?

759


What is an accessor in c++?

817


What are abstract data types in c++?

750


What is the copy-and-swap idiom?

817


Explain storage qualifiers in c++.

813


What is a dynamic binding in c++?

704


Which c++ operator cannot overload?

741