I have'nt 'played about' with sorting yet, But it would be easier in a program like this to have 3 variable's that get incremented dependinding on the answer.
Line 28 cout<<"A)your favourate drinks?<<endl"<<endl;
should be: cout<<"A)your favourate drinks?"<<endl<<endl;
This is a straight forward adding up exercise, you're inclusion of N,last_change and sorted just add to the confusion.
Also, it looks like your code is looking for the longest run of the same answer, which is different to the most frequent answer. I have presumed that your text is right and your code wrong ;)
1 2 3 4 5 6 7 8 9 10 11 12
for (int j = 1; j<=3; j++) // examine each possible answer
{
int cnt = 0; // tally for this answer
for (int k=0; k<7; k++) // iterate the questions looking for this answer
{
if (num[k]==j) // when we find it, increment the tally
cnt++;
}
cout <<j << " repeated " << (cnt) << " times " <<endl;
}
cout<<"thank you"<<endl<<endl;