Function Display Questions
<p>I was tasked to write a program to display a field of stars (*) based on the user inputted data. I got the code to work, but my instructor asked to put them in at least two functions. The displaybanner function is not working. getData runs and asks the user to enter the values but then the program stops after the inputs. What seems to be going wrong?</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

void displaybanner(int numrows=0, int numcolums=0, int numfields=0);

void getData(int numrows=0, int numcolumns=0, int numfields=0);

const char c = '*';



int main(void)
{
    getData();
    displaybanner();


}

void getData(int numrows,int numcolumns,int numfields)
{

    cout &lt;&lt; "Welcome to the banner creation program!" &lt;&lt; endl;

    cout &lt;&lt; "Enter the number of rows (1 - 5) --&gt; ";
    cin &gt;&gt; numrows;

    if(numrows&lt;1 || numrows&gt;5){
        cout &lt;&lt; "Your entered value is outside the range!" &lt;&lt; endl;
        cout &lt;&lt; "Program will now halt..." &lt;&lt; endl;
        exit(0);}


    cout &lt;&lt; "Enter the number of columns (5 - 50) --&gt; ";
    cin &gt;&gt; numcolumns;

    if(numcolumns&lt;5 || numcolumns&gt;50){
        cout &lt;&lt; "Your entered value is outside the range!" &lt;&lt; endl;
        cout &lt;&lt; "Program will now halt..." &lt;&lt; endl;
        exit(0);
    }

    cout &lt;&lt; "Enter the number of rows (3 - 10) --&gt; ";
    cin &gt;&gt; numfields;

    if(numfields&lt;3 || numrows&gt;10){
        cout &lt;&lt; "Your entered value is outside the range!" &lt;&lt; endl;
        cout &lt;&lt; "Program will now halt..." &lt;&lt; endl;
        exit(0);
    }

}

void displaybanner(int numfields, int numrows, int numcolumns)
{
for (int i = 0; i &lt; numfields; i++) {
  for (int j = 0; j &lt; numrows; j++) {
    for (int k = 0; k &lt; numcolumns; k++) {
      cout &lt;&lt; c;
    }
    cout &lt;&lt; endl;
  }
  cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; endl;
}
}
</code></pre>
