Pascal/Turbo Pascal - necesito que mi programa regrese a menu despues de ejecutar uana unidad y que pueda nombrar el txt.

 
Vista:
sin imagen de perfil

necesito que mi programa regrese a menu despues de ejecutar uana unidad y que pueda nombrar el txt.

Publicado por gustavo (1 intervención) el 27/04/2017 06:26:39
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
program proyecto;
uses crt,P1,P2,P3,P4,P5;
var
i,opcion:integer;
clave: string[30];
tecla : char;
begin
i:=1;
repeat
 textbackground(yellow);
clrscr;
 
gotoxy(20,3);write('Universidad Nacional Aut¢noma de M‚xico');
 gotoxy(14,4);write('Colegio de Ciencias y Humanidades Plantel Naucalpan');
 gotoxy(26,5);write('Es lo mejor que resolveras');
 gotoxy(20,6);write('Examen de cibernetica y computacion II');
 gotoxy(17,8);write('Nombre del profesor: Enrique Espinosa Gonzalez');
 gotoxy(25,9);write('Correo: espinosa68@hotmail.com');
 gotoxy(22,10);write('Alumno:');
 gotoxy(24,11);write('Correo: ');
 gotoxy(21,12);write('Grupo ');
 gotoxy(19,13);write('Turno matutino     Edificio B    Sal¢n 03');
 gotoxy(31,14);write('Ciclo Semestral');
 gotoxy(35,15);writeln('2017-02');
 
 
gotoxy(2,25);write('Escribe "la" contrasena: ');
clave:='';
 
     repeat
      tecla:=readkey ;
          if tecla in[#48..#57,#65..#90,#97..#122,#164,#165] then
           begin
      clave:=clave+tecla;
           gotoxy(6,40);write('*');
           end;
     until tecla=#13;
         write;
   if clave='espinosa'   then
 
     begin
       textbackground(red);
     clrscr;
 
      gotoxy(21,3);
 writeln('**Ingrese la Unidad a resolver**');
   gotoxy(26,5);
   writeln('Unidad 1. Presiona 1');
   gotoxy(26,6);
   writeln('Unidad 2. Presiona 2');
   gotoxy(26,7);
   writeln('Unidad 3. Presiona 3');
   gotoxy(26,8);
   writeln('Unidad 4. Presiona 4');
   gotoxy(26,9);
   writeln('Unidad 5. Presiona 5');
   writeln('Presiona 6 para salir.');
   gotoxy(23,12);
 writeln('Esta cosa si que cuesta un %&?%&$"#');
   gotoxy(38,13);
   readln(opcion);
 
    case opcion of
     1 : Begin
     textbackground(red);
   clrscr;
   or_U1;
   Unidad_1_1;
   Unidad_1_2;
   Unidad_1_3;
   Unidad_1_4;
   Unidad_1_5;
   Unidad_1_6;
   Unidad_1_7;
   Unidad_1_8;
   Unidad_1_9;
   Unidad_1_10;
   final_u1;
      end;
 
     2: begin
     clrscr;
      textbackground(green);
   clrscr;
     or_U2;
   Unidad_2_1;
   Unidad_2_2;
   Unidad_2_3;
   Unidad_2_4;
   Unidad_2_5;
   Unidad_2_6;
   Unidad_2_7;
   Unidad_2_8;
   Unidad_2_9;
   Unidad_2_10;
     final_u2
      end;
 
     3: begin
     clrscr;
      textbackground(yellow);
   clrscr;
     or_U3;
   Unidad_3_1;
   Unidad_3_2;
   Unidad_3_3;
   Unidad_3_4;
   Unidad_3_5;
   Unidad_3_6;
   Unidad_3_7;
   Unidad_3_8;
   Unidad_3_9;
   Unidad_3_10;
     final_u3;
      readkey;
      end;
 
      4: begin
      textbackground(yellow);
     clrscr;
      or_U4;
   Unidad_4_1;
   Unidad_4_2;
   Unidad_4_3;
   Unidad_4_4;
   Unidad_4_5;
   Unidad_4_6;
   Unidad_4_7;
   Unidad_4_8;
   Unidad_4_9;
   Unidad_4_10;
     final_u4;
     readkey;
      end;
 
      5: begin
     textbackground(yellow);
     clrscr;
      or_U5;
   Unidad_5_1;
   Unidad_5_2;
   Unidad_5_3;
   Unidad_5_4;
   Unidad_5_5;
   Unidad_5_6;
   Unidad_5_7;
   Unidad_5_8;
   Unidad_5_9;
   Unidad_5_10;
     final_u5;
     readkey;
       end
       end
       end
      else
      begin
      clrscr;
      end;
      i:=i+1;
until (clave='espinosa') or (i>3);
end.
la unidad se las puedo poner despues si la necesitan
se los agradeceria mucho si me pueden ayudar
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

necesito que mi programa regrese a menu despues de ejecutar uana unidad y que pueda nombrar el txt.

Publicado por ramon (2158 intervenciones) el 04/05/2017 16:30:36
mira esto pero tienes ejemplos de menus en esta pajina revisalos.


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
program proyecto;
uses crt,P1,P2,P3,P4,P5;
var
i,opcion:integer;
clave: string[30];
tecla : char;
begin
i:=1;
repeat
 textbackground(yellow);
clrscr;
 
gotoxy(20,3);write('Universidad Nacional Aut¢noma de M‚xico');
 gotoxy(14,4);write('Colegio de Ciencias y Humanidades Plantel Naucalpan');
 gotoxy(26,5);write('Es lo mejor que resolveras');
 gotoxy(20,6);write('Examen de cibernetica y computacion II');
 gotoxy(17,8);write('Nombre del profesor: Enrique Espinosa Gonzalez');
 gotoxy(25,9);write('Correo: espinosa68@hotmail.com');
 gotoxy(22,10);write('Alumno:');
 gotoxy(24,11);write('Correo: ');
 gotoxy(21,12);write('Grupo ');
 gotoxy(19,13);write('Turno matutino     Edificio B    Sal¢n 03');
 gotoxy(31,14);write('Ciclo Semestral');
 gotoxy(35,15);writeln('2017-02');
 
 
gotoxy(2,25);write('Escribe "la" contrasena: ');
clave:='';
 
     repeat
      tecla:=readkey ;
          if tecla in[#48..#57,#65..#90,#97..#122,#164,#165] then
           begin
      clave:=clave+tecla;
           gotoxy(6,40);write('*');
           end;
     until tecla=#13;
         write;
   if clave='espinosa'   then
 
     begin
     i := 1;
  repeat
       textbackground(red);
     clrscr;
 
      gotoxy(21,3);
 writeln('**Ingrese la Unidad a resolver**');
   gotoxy(26,5);
   writeln('Unidad 1. Presiona 1');
   gotoxy(26,6);
   writeln('Unidad 2. Presiona 2');
   gotoxy(26,7);
   writeln('Unidad 3. Presiona 3');
   gotoxy(26,8);
   writeln('Unidad 4. Presiona 4');
   gotoxy(26,9);
   writeln('Unidad 5. Presiona 5');
   writeln('Presiona 6 para salir.');
   gotoxy(23,12);
 writeln('Esta cosa si que cuesta un %&?%&$"#');
   gotoxy(38,13);
   readln(opcion);
 
    case opcion of
     1 : Begin
     textbackground(red);
   clrscr;
   or_U1;
   Unidad_1_1;
   Unidad_1_2;
   Unidad_1_3;
   Unidad_1_4;
   Unidad_1_5;
   Unidad_1_6;
   Unidad_1_7;
   Unidad_1_8;
   Unidad_1_9;
   Unidad_1_10;
   final_u1;
      end;
 
     2: begin
     clrscr;
      textbackground(green);
   clrscr;
     or_U2;
   Unidad_2_1;
   Unidad_2_2;
   Unidad_2_3;
   Unidad_2_4;
   Unidad_2_5;
   Unidad_2_6;
   Unidad_2_7;
   Unidad_2_8;
   Unidad_2_9;
   Unidad_2_10;
     final_u2
      end;
 
     3: begin
     clrscr;
      textbackground(yellow);
   clrscr;
     or_U3;
   Unidad_3_1;
   Unidad_3_2;
   Unidad_3_3;
   Unidad_3_4;
   Unidad_3_5;
   Unidad_3_6;
   Unidad_3_7;
   Unidad_3_8;
   Unidad_3_9;
   Unidad_3_10;
     final_u3;
      readkey;
      end;
 
      4: begin
      textbackground(yellow);
     clrscr;
      or_U4;
   Unidad_4_1;
   Unidad_4_2;
   Unidad_4_3;
   Unidad_4_4;
   Unidad_4_5;
   Unidad_4_6;
   Unidad_4_7;
   Unidad_4_8;
   Unidad_4_9;
   Unidad_4_10;
     final_u4;
     readkey;
      end;
 
      5: begin
     textbackground(yellow);
     clrscr;
      or_U5;
   Unidad_5_1;
   Unidad_5_2;
   Unidad_5_3;
   Unidad_5_4;
   Unidad_5_5;
   Unidad_5_6;
   Unidad_5_7;
   Unidad_5_8;
   Unidad_5_9;
   Unidad_5_10;
     final_u5;
     readkey;
       end
       end
       end
      else
      begin
      clrscr;
      end;
      i:=i+1;
  until (i>3);
until (clave='espinosa') or (i>3);
end.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar