please tell me what a parkside triangle is

well i have to make one and before i make i wont to know what it is and what is the order the number come out random or like

1
12
123
1234
12345

please help
so can you tell why this

#include <iostream>

using namespace std;


void input(int &height,int &seed){

cout<<"how tall do you want your triangle"<<endl;
cin>>height;
cout<<endl;
cout << " enter a seed ";
cin >> seed;
}

void output(int height, int seed){

for (int a = 1; a<= seed; a++)
{
for (int b= 1;b <= a;b++)
cout << b;
cout << endl;
}
}

int main(){


int height;
int seed;


input(height,seed);
output(height,seed);

return 0;
}

wont output the numbers like that website u sent to me
anyone?
I don´t know what seed is, but you don´t actually need it for the output that you have.

The problem is in your output function:
1
2
3
4
5
6
7
8
9
void output(int height, int seed){

  for (int a = 1; a<= height; a++) // go through height, not seed
  {
    for (int b= 1;b <= a;b++)
      cout << b;
    cout << endl;
  }
}



What output are you getting?
this is what i am trying to get but going up instead of down



height = 4 Seed = 1


1 2 4 7

3 5 8

6 9

1
height = 5 Seed = 3

3 4 6 9 4

5 7 1 5

8 2 6

3 7

8
I would make two dimensional array all initialized with 0. Then I will do two nested for-loops.
Topic archived. No new replies allowed.