Pascal/Turbo Pascal - Ayuda con Turbo Pascal

 
Vista:

Ayuda con Turbo Pascal

Publicado por Mery (5 intervenciones) el 14/06/2013 02:45:24
Ayuda o asesoría con un programa de listas en turbo pascal, necesito q el programa pueda visualizar una lista de 15 estudiantes específicos en una sección de clases d una universidad, localizar sus calificaciones o promedio de la sección, a través de un menú q haga esto: 1) Buscar estudiante. 2)modificar lista, Eliminar estudiante, insertar estudiante. y 3) Promedio de la sección. por favor ayuda. con términos lo mas básico posible, y q si corran los ejemplos en el programa, es q todo al q le pido orientación m dice no saber d turbo pascal, Los estudiantes serian en este caso:

Nombre. Apellido. Cédula. Calificación
Lore Di. 22888478. 16
Ramon Ba. 23568984. 18
Luis De. 24589631. 18
Marcos He. 23541863. 16
Naza Os. 24239515. 14
Maria Ca. 23589644. 19
Harry La. 19542888. 10
Renzo Ro. 25841396. 16
Maguil Ca 23568474 08
Jesus. Bo 22888891 14
Junior Lu 21946444 12
Andrea Ar 23569414. 11
Carlos Sa 13464445 . 15
Kelly Bar 22649778 . 13
Esther Pu 24649464 14
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

Ayuda con Turbo Pascal

Publicado por ramon (2158 intervenciones) el 15/06/2013 23:31:42
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
{Espero esto sirva}
 
program estudiantes;
 uses
    crt;
  type
    regstu = record
         nombre : string[80];
         apellido : string[80];
         ncedula  : word;
         calific  : real;
       end;
 
  var
    estudiante : array[1..15] of regstu;
    cont : integer;
    tecla : char;
 
  procedure entradas;
  begin
      clrscr;
      cont := cont + 1;
      if cont > 15 then
      begin
         writeln(' Finalizadas las entradas pulse una tecla');
         readkey;
      end
    else
      begin
      writeln(' **** Entrada de datos ****');
      writeln;
      write('  Entre Nombre : ');
      readln(estudiante[cont].nombre);
      write('  Entre Apellido : ');
      readln(estudiante[cont].apellido);
      write('  Entre No Cedula : ');
      readln(estudiante[cont].ncedula);
      write('  Entre Calificacion : ');
      readln(estudiante[cont].calific);
    end;
  end;
 
  procedure modificacion;
  var
    cedu : word;
    i : integer;
    encont : boolean;
  begin
     clrscr;
     encont := false;
     writeln(' **** Modificacion de datos ****');
     writeln;
     write('  Entre No Cedula : ');
     readln(cedu);
     for i := 1 to cont do
     begin
     if cedu = estudiante[i].ncedula then
     begin
        encont := true;
        break;
     end;
   end;
      if encont = true then
      begin
          clrscr;
          writeln(' Pulse Opcion ');
          writeln;
          writeln(' 1 = Nombre ');
          writeln(' 2 = Apellido ');
          writeln(' 3 = No Cedula ');
          writeln(' 4 = Calificacion ');
          writeln(' 5 = Nada ');
          repeat
              tecla := readkey;
          until tecla in['1','2','3','4','5'];
        case tecla of
     '1' : begin
           write('  Entre Nombre : ');
           readln(estudiante[i].nombre);
           end;
     '2' : begin
           write('  Entre Apellido : ');
           readln(estudiante[i].apellido);
           end;
     '3' : begin
           write('  Entre No Cedula : ');
           readln(estudiante[i].ncedula);
           end;
     '4' : begin
           write('  Entre Calificacion : ');
           readln(estudiante[i].calific);
           end;
     '5' :;
       end;
     end;
  end;
 
  procedure anulaestud;
  var
    cedu : word;
    g, i : integer;
    encont : boolean;
  begin
     clrscr;
     encont := false;
     writeln(' **** Anular Estudiante ****');
     writeln;
     write('  Entre No Cedula : ');
     readln(cedu);
     for i := 1 to cont do
     begin
     if cedu = estudiante[i].ncedula then
     begin
        encont := true;
        break;
     end;
   end;
      if encont = true then
      begin
         for g := i to cont - 1 do
         estudiante[g] := estudiante[g + 1];
         cont := cont - 1;
         if cont < 0 then
         cont := 0;
      end;
  end;
 
  procedure buscaestud;
  var
    cedu : word;
    i : integer;
    encont : boolean;
  begin
     clrscr;
     encont := false;
     writeln(' **** Buscar Estudiante ****');
     writeln;
     write('  Entre No Cedula : ');
     readln(cedu);
     for i := 1 to cont do
     begin
     if cedu = estudiante[i].ncedula then
     begin
        encont := true;
        break;
     end;
   end;
      if encont = true then
      begin
      clrscr;
      writeln;
      writeln('  Nombre    : ',estudiante[i].nombre);
      writeln('  Apellido  : ',estudiante[i].apellido);
      writeln('  No Cedula : ',estudiante[i].ncedula);
      writeln('  Calificacion : ',estudiante[i].calific:0:2);
      writeln;
      writeln('  Pulse una tecla');
      readkey;
      end;
  end;
 
  procedure promedio;
  var
    numm : real;
    t : integer;
  begin
     numm := 0.0;
     for t := 1 to cont do
     numm := numm + estudiante[t].calific;
     clrscr;
     writeln('*** Promedio Caluficaciones ***');
     writeln;
     writeln('  El Promedio Es : ',numm / cont:0:2);
     writeln;
     writeln('  Pulse una tecla');
     readkey
  end;
 
  procedure menu;
  var
     sal : boolean;
     ted, tec : char;
  begin
     sal := false;
    repeat
       clrscr;
       writeln('     ****** Menu General ******');
       writeln;
       writeln('          1 = Entrada Estudiantes');
       writeln('          2 = Modificar Datos');
       writeln('          3 = Anular Estudiante');
       writeln('          4 = Buscar Estudiante');
       writeln('          5 = Ver Media');
       writeln('          6 = Salir');
       writeln;
       writeln('      >>> Elija Opcion <<<');
       repeat
           tec := readkey;
       until tec in['1','2','3','4','5','6'];
       clrscr;
   case tec of
 '1' : begin
           entradas;
       end;
 '2' : begin
          modificacion;
       end;
 '3' : begin
          anulaestud;
       end;
 '4' : begin
          buscaestud;
       end;
 '5' : begin
          promedio;
       end;
 '6' : sal := true;
    end;
    until sal = true;
  end;
 
  begin
     cont := 0;
     menu;
  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