program is working but it does not go back to the main menu

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...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
#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();
}

I do not see where you initialize your loop boundary (numbers), and what is supposed to be included in the loop? If you do not have a brace enclosed block after a for statement, it will only include the following single statement. Sorry if this gets posted twice; I thought I already posted a response to this.



Topic archived. No new replies allowed.