www.pudn.com > zb.rar > main.c


show7() 
{int choice; 
 printf("\n***********************FUNCTION*********************************\n"); 
 printf("\t*1.list\n\t*2.string\n\t*3.stack\n\t*4.kmp\n\t*5.sort\n\t*6.path\n\t*7.exit"); 
 printf("\n***************************************************************\n"); 
 printf("please make the choice.\n"); 
 do 
  {scanf("%d",&choice); 
   if((choice<1)||(choice>7)) 
   printf("ERROR!please input again.\n"); 
  }while((choice<1)||(choice>7)); 
 return(choice); 
} 
main() 
{ 
 int choice; 
 
  do 
  {choice=show7(); 
   switch(choice) 
    {case 1:{LIST(); 
             break; 
             } 
     case 2:{str(); 
             break; 
             } 
     case 3:{stack(); 
             break; 
             } 
     case 4:{kmpt(); 
             break; 
             } 
     case 5:{pai(); 
             break; 
             } 
     case 6:{gua(); 
             break; 
             } 
     case 7:break; 
    } 
  }while(choice!=7); 
}