Why is my expected output not happening?
<pre><code>   /*This program will ask a user to enter a song list. By doing this each time that the user enters
a song, he/she will then be asked if they want to enter another song, if yes then they will enter another song.There will be a maximum of 15 songs.
This progarm will help a user keep track of their songs. But then the program will output the amount of songs, and what they are.
input:A song. Then a yes or no, if yes, another song, if no the program will output.
output:The number of songs, and then the songs themselves, each song with it's own individual line.
processing: There will be two functions, one of which will ask the user for the songs and store them, and another for which will be computing
the output.
*/
    #include&lt;iostream&gt;
    #include&lt;string&gt;

    using namespace std;

    void input(string[15], int);
    void printArray(string[15], int);

    int main()
    {
    string songarray[15];
    int arraysize=15;
    int j=0;

    input(songarray, arraysize);

    int x=songarray[j].length();

    cout&lt;&lt;"There were "&lt;&lt;x&lt;&lt;" song titles entered.";
    printArray(songarray, x);
    return 0;
    }

/*This function will ask for the users input for a song and store the song in the songarray. He or she
will then be asked whether or not they want to enter another song, if so, then they will enter another song.
input:a song, y/Y or n/N for if they want to continue or not with another song
output:song will be sent to main function
processing: A while loop will be used for the user to enter is Y or N, and a for loop (while loop nested) for the user to enter the 
songs
*/
    void input(string titles[15], int rows)
    {

    char answer='y';

    for(int i=0;i&lt;rows &amp;&amp; (answer=='Y' || answer=='y');i++)
    {

        cout&lt;&lt;"Enter the name of a song. ";
        cin&gt;&gt;titles[i];
        cout&lt;&lt;"Do you want to continue (y/n)? ";
        cin&gt;&gt;answer;
    }
    }

/*The purpose of this function is to print the array from the main function.
input:accepts the array from the main function
output: prints the array
processing:nested loops will pring this array.
*/

    void printArray(string playlist[15], int quantity)
    {
    for(int j=0; j&lt;quantity; j++)
    {
        cout&lt;&lt;playlist[j];
    }
    }
</code></pre>

<p>So the expected output is clear, where the program asks to enter a song, then ask the user to enter y or n for yes or no if they want enter another song. If yes then the program asks again. But then the max is fifteen songs, at the end if the user enters n or gets to fifteen the program will output "There have been blank song titles entered" where blank is is the amount of songs entered. I have been either getting no output, 0 songs entered, and/ or nothing close to the output i wanted, what is my problem?/</p>
