Pease Help Me

May 14, 2013 at 3:20pm
how to draw a simple triangle using ncurses nested for loops
*
**
***
****
May 14, 2013 at 3:41pm
no one could answer it
May 14, 2013 at 5:47pm
closed account (N85iE3v7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>

using namespace 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...
May 15, 2013 at 2:02am
Yes sir i love to learn c++. thank you very much
May 15, 2013 at 3:00am
Why did you make 3 topics for this same question? Read the sticky's before posting please do us all a favor.
May 19, 2013 at 2:48am
coz no one answer me
Topic archived. No new replies allowed.