This is the code:

Code:
#include <iostream>
using namespace std;

int main()
{
for(int a=1; a<=10; a++)
{
for(int b=1; b<=a; b++)
cout<<"*";
cout<<"\n";
}
}
The code is actually done, cause we are really required to use "for" but I just want to see it done with "while", cause I prefer "while" rather than "for".