write a C++ programming using for loop:
*
* *
* * *
* * * *

Answer Posted / devi

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

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between struct and class in terms of access modifier.

705


What is an object in c++?

625


What is a driver program?

643


What is pure virtual function? Or what is abstract class?

602


What is the purpose of ios::basefield in the following statement?

800






What is the best c++ compiler?

598


How many keywords are used in c++?

571


What is ios class in c++?

590


Explain binary search.

587


Give an example of run-time polymorphism/virtual functions.

570


Write about the various sections of the executable image?

583


Explain what happens when a pointer is deleted twice?

747


Is c++ proprietary?

591


Why are pointers used?

588


What do you mean by friend class & friend function in c++?

627