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 explain to me in detail to thanks

Recommended Answers

have you searched the web for description and examples?

Jump to Post

a reply from your first post would just get a similar description found in the web
is there any specific detail that you didn't understand?

Jump to Post

All 5 Replies

have you searched the web for description and examples?

a reply from your first post would just get a similar description found in the web
is there any specific detail that you didn't understand?

this is what i have but it only does

1
12
123
1234
12345

#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;
}
Be a part of the DaniWeb community

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