int menu(c){
int choose;
do{
printf("*MENU\n");
printf("*Press 2 to move down\n");
printf("*Press 4 to move left\n");
printf("*Press 6 to move right\n");
printf("*Press 8 to move up\n");
printf("*Press 5 to switch\n");
printf("*Press 0 to quit\n");
printf("Please enter your choose: ");
scanf("%i",&choose);
if(choose==2){
}else if(choose==4){
}else if(choose==6){
}else if(choose==8){
}else if(choose==5){
}else if(choose==0){
printf("Exit the program!");
}else{
printf("Invalid Input!\n\n");
}
}while(choose!=0);
return 0
The coding abobe show my function for my menu. what i want is it will repeat the menu without going to new line in DOS