can u help me in my assignment:

make a program that would display the figure as shown. use a WHILE structure and a method to implement a task.


this is the one i made:
please help me what are the missing codes there..


#include <iostream.h>
#include <stdio.h>
#include <conio.h>

using namespace std;

void whil()
{
int x;

x=1;

while (x>=11)
{
x=x+1;
cout<<"*"<<x;
x++;

}
}

main()
{
whil();

getch();
return 0;
}

i forgot to put the figure..

this is the figure:

*
**
***
****
*****
******
*******
********
*********
**********
***********

you cant name a method with name "while"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.