Guys, I really really need a hand on this simple problem that I think, for me, is a really really big problem. I'm using the compiler turbo C. I have all the codes working except that it does not go back to the main menu. Can you please check my codes? Any help would really really gonna be appreciated...

#include <iostream.h>
#include <fstream.h>
#include <assert.h>
#include <conio.h>
#include <iomanip.h>
#include <dos.h>



int main (void)
{
	int number, i, age, select;
	char name[30], add[50];
	ofstream fout;

textcolor(CYAN);
clrscr();
{
fout.open("g:\lastoutfile.txt", ios ::app); //open file for appending
assert (!fout.fail());
for ( i=1; i<=number; i++)

gotoxy(30,6);
cout<<"SLIPPERS ON THE GO SYSTEM";
gotoxy(33,8);
cout<<"*INFORMATION SHEET*";
gotoxy(20,11);
cout<<"* Enter your name:" ;
cin>>name;
gotoxy(20,12);
cout<<"* Enter your age:" ;
cin>>age;
gotoxy(20,13);
cout<<"* Where do you live ?:" ;
cin>>add;
gotoxy(20,14);
cout<<"Information is being proccesed  ";
cout<<".";
sleep(1);
cout<<".";
sleep(1);
cout<<".";
sleep(1);

gotoxy(20,15);
cout<<"\a";
cout<<"Information saved..";
sleep(1);
gotoxy(20,16);
cout<<"Loading to Main Menu  ";
cout<<".";
sleep(1);
cout<<".";
sleep(1);
cout<<".";
sleep(1);

fout<<name<<setw(5)<<age<<setw(10)<<add<<endl;
// send to file

fout.close ();	//close file
assert (!fout.fail());



}


{
textcolor(13);
clrscr();
gotoxy(25,8);
cout<<"MAIN MENU";
gotoxy(25,9);
cout<<"SLIPPERS ON THE GO SYSTEM";
gotoxy(25,13);
cout<<"(1) FLOPS-FLATS";
gotoxy(25,14);
cout<<"(2) FLOPS-HIGH";
gotoxy(25,15);
cout<<"(3) FLOPS-BEADED";
gotoxy(25,16);
cout<<"(4) FLOPS-BEADED HIGH";
gotoxy(25,17);
cout<<"(5) FLOPS-IN JELLY";
gotoxy(25,18);
cout<<"(6) FLOPS-JELLY HIGH";
gotoxy(25,19);
cout<<"(7) FLOPS-JELLY BEADED";
gotoxy(25,20);
cout<<"(8) EXIT";
gotoxy(25,23);
cout<<"Which style do you prefer ? ";
cin>>select;


}

if (select==1)
{
clrscr();

	  gotoxy(25,4);
	  cout<<"SLIPPERS ON THE GO SYSTEM";
	  gotoxy(25,7);
	  cout<<"*FLOPS-FLATS*";
	  gotoxy(20,10);
	  cout<<"CHOICE OF COLOR: AVAILABLE IN COLORS:";
	  gotoxy(20,13);
	  cout<<"RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET";
	  gotoxy(20,15);
	  cout<<"DESCRIPTION:TRENDY AND FAB";
	  gotoxy(20,17);
	  cout<<"AVAILABLE SIZES: 7, 8, 9, 10, halfsizes not available";
	  gotoxy(20,19);
	  cout<<"PRICE: 650php";



 }

else if (select==2)
{
textcolor(YELLOW);
clrscr();

 gotoxy(25,4);
	  cout<<"SLIPPERS ON THE GO SYSTEM";

	  gotoxy(25,7);
	  cout<<"*FLOPS-HIGH*";
	  gotoxy(20,10);
	  cout<<"CHOICE OF COLOR: AVAILABLE IN COLORS:";
	  gotoxy(20,13);
	  cout<<"HI-RED,HI-ORANGE,HI-YELLOW,HI-GREEN";
	  gotoxy(20,15);
	  cout<<"HI-BLUE,HI-INDIGO,HI-VIOLET";
	  gotoxy(20,17);
	  cout<<"DESCRIPTION:HIGH HEELED,TRENDY AND FAB";
	  gotoxy(20,19);
	  cout<<"AVAILABLE SIZES: 7, 8, 9, 10, halfsizes not available";
	  gotoxy(20,21);
	  cout<<"PRICE: 750php";
	  gotoxy(30,23);

	  cout<<"NOTE: You may use underscore for spacing...";
		gotoxy(30,25);
		cout<<"Press any key to continue...";
		getch();


	  }

else if (select==3)
{
clrscr();

 gotoxy(25,4);
 cout<<"SLIPPERS ON THE GO SYSTEM";
 gotoxy(25,7);
 cout<<"*FLOPS-BEADED*";
 gotoxy(20,10);
 cout<<"CHOICE OF COLOR: AVAILABLE IN COLORS:";
	  gotoxy(20,13);
	  cout<<"APPLEBEADED-RED, ORANGEBEADED-ORANGE";
	  gotoxy(20,15);
	  cout<<"MANGOBEADED-YELLOW,LIMEBEADED-GREEN,";
	  gotoxy(20,17);
	  cout<<" SEABEADED-BLUE, CRAYONBEADED-INDIGO, EGGPLANTBEADED-VIOLET";
	  gotoxy(20,19);
	  cout<<"DESCRIPTION:TRENDY AND FAB";
	  gotoxy(20,21);
	  cout<<"AVAILABLE SIZES: 7, 8, 9, 10, halfsizes not available";
	  gotoxy(20,23);
	  cout<<"PRICE: 850php";
	  }

else if (select==4)
{
clrscr();

	  gotoxy(25,4);
	  cout<<"SLIPPERS ON THE GO SYSTEM";
	  gotoxy(25,7);
	  cout<<"*FLOPS-BEADED HIGH*";
	  gotoxy(20,10);
	  cout<<"CHOICE OF COLOR: AVAILABLE IN COLORS:";
	  gotoxy(20,13);
	  cout<<"HI-APPLEBEADED-RED, HI-ORANGEBEADED-ORANGE";
	  gotoxy(20,15);
	  cout<<"HI-MANGOBEADED-YELLOW,HI-LIMEBEADED-GREEN,HI-SEABEADED-BLUE";
	  gotoxy(20,17);
	  cout<<"HI-CRAYONBEADED-INDIGO, HI-EGGPLANTBEADED-VIOLET";
	  gotoxy(20,19);
	  cout<<"DESCRIPTION:HIGH HEELED,TRENDY AND FAB";
	  gotoxy(20,21);
	  cout<<"AVAILABLE SIZES: 7, 8, 9, 10, halfsizes not available";
	  gotoxy(20,23);
	  cout<<"PRICE: 850php";
	  }

else if (select==5)
{
clrscr();
	gotoxy(25,4);
	cout<<"SLIPPERS ON THE GO SYSTEM";
	gotoxy(25,7);
	cout<<"*FLOPS-IN JELLY*";
 gotoxy(20,10);
	  cout<<"CHOICE OF COLOR: AVAILABLE IN COLORS:";
	  gotoxy(20,13);
	  cout<<"TRANSPARENT-RED, TRANSPARENT-ORANGE, TRANSPARENT-YELLOW";
	  gotoxy(20,15);
	  cout<<"TRANSPARENT-GREEN,TRANSPARENT-BLUE";
	  gotoxy(20,17);
	  cout<<"TRANSPARENT-INDIGO, TRANSPARENT-VIOLET";
	  gotoxy(20,19);
	  cout<<"DESCRIPTION:TRENDY AND FAB";
	  gotoxy(20,21);
	  cout<<"AVAILABLE SIZES: 7, 8, 9, 10, halfsizes not available";
	  gotoxy(20,23);
	  }


	 else if (select==6)
{
clrscr();
	gotoxy(25,4);
	cout<<"SLIPPERS ON THE GO SYSTEM";
	gotoxy(25,7);
	cout<<"*FLOPS-IN JELLY-HIGH*";
 gotoxy(20,10);
	  cout<<"CHOICE OF COLOR: AVAILABLE IN COLORS:";
	  gotoxy(20,13);
	  cout<<"TRANSPARENT-RED, TRANSPARENT-ORANGE, TRANSPARENT-YELLOW";
	  gotoxy(20,15);
	  cout<<"TRANSPARENT-GREEN,TRANSPARENT-BLUE";
	  gotoxy(20,17);
	  cout<<"TRANSPARENT-INDIGO, TRANSPARENT-VIOLET";
	  gotoxy(20,19);
	  cout<<"DESCRIPTION:TRENDY AND FAB";
	  gotoxy(20,21);
	  cout<<"AVAILABLE SIZES: 7, 8, 9, 10, halfsizes not available";
	  gotoxy(20,23);
	  }



	  else if (select==7)
{
clrscr();
	gotoxy(25,4);
	cout<<"SLIPPERS ON THE GO SYSTEM";
	gotoxy(25,7);
	cout<<"*FLOPS-IN JELLY-BEADED*";
 gotoxy(20,10);
	  cout<<"CHOICE OF COLOR: AVAILABLE IN COLORS:";
	  gotoxy(20,13);
	  cout<<"TRANSPARENT-RED, TRANSPARENT-ORANGE, TRANSPARENT-YELLOW";
	  gotoxy(20,15);
	  cout<<"TRANSPARENT-GREEN,TRANSPARENT-BLUE";
	  gotoxy(20,17);
	  cout<<"TRANSPARENT-INDIGO, TRANSPARENT-VIOLET";
	  gotoxy(20,19);
	  cout<<"DESCRIPTION:TRENDY AND FAB";
	  gotoxy(20,21);
	  cout<<"AVAILABLE SIZES: 7, 8, 9, 10, halfsizes not available";
	  gotoxy(20,23);
	  }

else if (select==8)
{
clrscr();

		  gotoxy(30,4);
		  cout<<"SLIPPERS ON THE GO SYSTEM";
		  gotoxy(32,14);
		  cout<<"----Created By----";
		  gotoxy(31,16);
		  cout<<"---JIL ANNE OPE¥A---";
		  gotoxy(32,20);
		  cout<<"EXITING SYSTEM";
		  cout<<".";
		  sleep(1);
		  cout<<".";
		  sleep(1);
		  cout<<".";
		  sleep(1);
		  sleep(2);
		  }


else
{
clrscr();
cout<<"An error occured";
}










getch();
}

Just out of curiosity, how are you learning to code in c++
(ex: what method are you using, book, online tutorial, school professor...)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.