Hello everyone...!

This programme is a very simple one which prints a list of options from which the user is asked to select one. After the user inputs his selection, the programme prints it and again shows the list to select from. It should keep on going until the user types "quit". But actually it continues the loop whether you type quit or not and does'nt come to end until you Ctrl/Break it yourself. Please go through the source code below and mark the mistake for me.

Code:
/*Ex 8.3*/
/*prints the selected option from a menu*/

#include<string.h>
#include<stdio.h>
#define MAX 7
#define LEN 15

int main(void)
{
 char menu[MAX][LEN]={ "RL series",             /*Array initialization*/
		       "RC series",
		       "LC series",
		       "RL parallel",
		       "RC parallel",
		       "LC parallel",
		       "quit" };
 char optn[BUFSIZ],out[BUFSIZ],i;               /*declares input and output arrays*/
 system("cls");
 do
 {
  for (i=0;i<MAX;i++)                          /*prints the menu*/
	printf("%s\n", menu[i]);

  printf("Enter option >>");
  gets(optn);                                  /*gets the option selected*/
  for (i=0;i<MAX;i++)                          /*go throughs the menu array*/
  {
   if( strcmp(&menu[i][0],optn) == 0 )                  // if input matches with the
       {                                                // menu option...
	sprintf(out,">>>%s option selected",&menu[i]);  // puts the output into out[]
	puts(out);               /*prints the output*/
       }                                       
  }
 }
 while( strcmp(&menu[6][0],out) != 0);         /*exits loop if the output is "quit"*/
 system("pause");
 return(0);
}