#include <iostream>
usingnamespace std;
int main( )
{
int i = 0;
int j = 0;
for( ; i < 4; i++)
{
for( j = 0 ; j <= i ; j++ )
{
cout << '*';
}
cout << endl;
}
return 0;
}
It would be worth if you had writen some code, after all it seems you want to learn C++ , don't you ? Make it better and write a function to print generic triangles...