Pascal/Turbo Pascal - Ayuda Ejercicios de Pascal/Turbo Pascal

 
Vista:
sin imagen de perfil

Ayuda Ejercicios de Pascal/Turbo Pascal

Publicado por jose (1 intervención) el 07/06/2014 03:37:13
Hola a la comunidad de programadores, amigos necesito su ayuda con este ejercicios de progrmacion pascal para poder lograr aprobar laboratorio me vale 30% de la nota ,es urgente , si pueden ayudarme se los agradecería .por favor ayudenme amigos gracias.


El liceo jacinto lara debe tener el registro de sus estdudiantes con las notas de sus respectivas materias .los datos a guardar de los estudiante son: cedula,apellido y nombre, grado que cursa,materia cursada,nota final por materia y seccion.se requiere que usted calcule y muestre :
1- listado de estudiantes pro materia ordenando por numero de cedula
2- de un estudiante a buscar muestre materia inscritas y su respectiva nota final.
3-promedio de notar por materia.
4-promedio de notas de un estudiante dado.
debe tomar en cuenra ciertos aspectos :
1-las notas deben ser numericas
2-los nombre deben ser solo letras
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 Ejercicios de Pascal/Turbo Pascal

Publicado por ramon (2158 intervenciones) el 08/06/2014 00:56:38
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
{Mira esto puede ayudar si necesitas mas dilo pero con esto creo que te servirá}
 
 program estudiantes;
 uses
    crt;
 const
    max = 40;
    materias : array['A'..'E'] of string[12] = (
    'Matematicas','Lenguaje','Fisica','Biologia','Ingles');
  type
     estudiante = record
           cedula : longint;
         apellido : string[80];
           nombre : string[80];
          gradonu : integer;
          materia : char;
          notafin : array['A'..'E'] of real;
          seccion : integer;
         end;
 
   var
     estud : array[1..max] of estudiante;
      cont : integer;
     tecla : char;
 
  procedure entradadatos_estudiantes(var es : estudiante);
  begin
     clrscr;
     writeln('***** Entrada Estudiante *****');
     writeln;
     with es do
     begin
     write('  Entre N. Cedula : ');
     readln(cedula);
     write('  Entre Apellido  : ');
     readln(apellido);
     write('  Entre Nombre    : ');
     readln(nombre);
     write('  Entre Grado     : ');
     readln(gradonu);
   repeat
     write('  [A]=Matematicas  [B]=Lenguaje  [C]=Fisica  [D]=Biologia  [E]=Ingles');
     writeln;
     write('  Entre Materia   : ');
     readln(materia);
     materia := upcase(materia);
     if materia in['A','B','C','D','E'] then
     tecla := ' '
  else
     clrscr;
   until materia in['A','B','C','D','E'];
     materia := upcase(materia);
     write('  Entre Notafinal : ');
     readln(notafin[materia]);
     write('  Entre Seccion   : ');
     readln(seccion);
     end;
  end;
 
  procedure ordenapormateriaycedula;
  var
    tt, rr : integer;
    orden : estudiante;
    stru : array[1..max] of estudiante;
    matr : char;
  begin
      for tt := 1 to cont do
      stru[tt] := estud[tt];
      for rr := 1 to cont do
        for tt := rr + 1 to cont do
      begin
         if stru[rr].cedula > stru[tt].cedula then
         begin
            orden := stru[rr];
            stru[rr] := stru[tt];
            stru[tt] := orden;
         end;
      end;
          for tt := 1 to cont do
          begin
             if stru[tt].materia = 'A' then
             begin
                writeln(' materia : ',stru[tt].materia);
             end;
           end;
           for tt := 1 to cont do
          begin
             if stru[tt].materia = 'B' then
             begin
                writeln(' materia : ',stru[tt].materia);
             end;
          end;
          for tt := 1 to cont do
          begin
             if stru[tt].materia = 'C' then
             begin
                writeln(' materia : ',stru[tt].materia);
             end;
           end;
        for tt := 1 to cont do
          begin
             if stru[tt].materia = 'D' then
             begin
                writeln(' materia : ',stru[tt].materia);
             end;
           end;
          for tt := 1 to cont do
          begin
             if stru[tt].materia = 'E' then
             begin
                writeln(' materia : ',stru[tt].materia);
             end;
         end;
      end;
 
  begin
      cont := 1;
      repeat
      entradadatos_estudiantes(estud[cont]);
      writeln;
      writeln('  <<<< Desea Entrar Mas Estudiantes [S/N] >>>>');
      repeat
         tecla := upcase(readkey);
      until tecla in['S','N'];
      if tecla = 'S' then
      cont := cont + 1;
      if cont > max then
      cont := max;
     until tecla = 'N';
     clrscr;
     ordenapormateriaycedula;
     readkey;
  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