Pascal/Turbo Pascal - Duda

 
Vista:

Duda

Publicado por eduardo (13 intervenciones) el 01/06/2013 01:49:43
Queria saber como puedo hacer un programa en base a que me pueda definir mi notas de mis materias x 100 puntos entre los % que sean de cada evaluacion es decir

saque 95 en dicho examen y el examen vale 15 % = ?? quiero que me diga cuanto saque en total ps

creo que primero se coloca el 95 x 0.15 y luego se divide entre 5 = 2.85

quiero algo asi =)

alguien me explicaria o me hecha la mano haciendo un programa con eso ? x lo normal en mi colegio se usa 5 % 10 % 15 % 20 % 25% y 30%

por lo general se usan eso nunca e visto que exedan de esos porcentajes. bueh eso es todo espero que me ayuden *-*
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

Duda

Publicado por ramon (2158 intervenciones) el 03/06/2013 16:45:27
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
{A ver si esto te encamina, fíjate en el tanto por 100 te marco el 15 pero tu sabrás como lo valoran
 ellos.
 
 program notas;
  uses
     crt;
  const
     por100 : array[1..6] of integer = (
     5,10,15,20,25,30);
     n = 5;
  type
     examenes = record
          materia : string[100];
          nota    : real;
        end;
  var
    evalut : real;
    losexam : array[1..n] of examenes;
    f : file of examenes;
    cont : integer;
    lasnot : array[1..n] of real;
 
 
    procedure entradaexamen;
    var
      entra : examenes;
    begin
        clrscr;
        writeln('**** Entrada Notas De Examen ****');
        writeln;
        write('  Materia    : ');
        readln(entra.materia);
        write('  Puntuacion : ');
        readln(entra.nota);
        assign(f,'misexam.dat');
     {$I-} reset(f); {$I+}
        if ioresult <> 0 then
        begin
            cont := 1;
            losexam[cont] := entra;
            rewrite(f);
            seek(f,cont - 1);
            write(f,losexam[cont]);
            close(f);
        end
      else
         begin
           cont := filesize(f);
           losexam[cont - 1] := entra;
           seek(f,cont);
           write(f,losexam[cont - 1]);
           close(f);
         end;
    end;
 
   procedure calculonotas;
   var
     pasa, numt : longint;
     total : real;
   begin
       assign(f,'misexam.dat');
     {$I-} reset(f); {$I+}
        if ioresult <> 0 then
        begin
           writeln('   Falta El Archivo De Notas');
           writeln('   Pulse Una Tecla');
           readkey;
        end
   else
        begin
           numt := filesize(f) - 1;
           writeln('***** Las Examenes Y Las Notas Son *****');
           writeln;
           for pasa := 0 to numt do
           begin
              seek(f,pasa);
              read(f,losexam[pasa + 1]);
        writeln('   ',losexam[pasa + 1].materia,'   ',
                                     losexam[pasa + 1].nota:0:0);
        end;
        writeln;
        writeln('<<<< La Punmtuacion Por Materia Es >>>>');
        writeln;
        for pasa := 0 to numt do
        begin
          lasnot[pasa + 1] := (losexam[pasa + 1].nota * por100[3] / 100) / n;
          writeln('   ',losexam[pasa + 1].materia,'  Nota : ',
                          lasnot[pasa + 1]:0:2);
        end;
        writeln;
        total := 0;
        for pasa := 1 to numt - 1 do
        total := total + lasnot[pasa];
        writeln('   El Total De Nota Es : ',total:0:2);
        close(f);
        writeln('   Pulse Una Tecla');
        readkey;
      end;
   end;
 
   procedure revisarexamen;
   var
      h, pa : longint;
      dat : examenes;
   begin
       assign(f,'misexam.dat');
     {$I-} reset(f); {$I+}
        if ioresult <> 0 then
        begin
           writeln('  Error Archivo No Encontrado Pulse Una Tecla');
           readkey;
        end
      else
        begin
          pa := filesize(f) - 1;
          writeln('**** Los Resultados Por Materia Es ****');
          writeln;
          for h := 0 to pa do
          begin
             seek(f,h);
             read(f,dat);
             writeln('  Materia ',dat.materia,'   Puntuacion ',dat.nota:0:2);
          end;
            close(f);
            writeln;
            writeln('  Pulse Una Tecla');
            readkey;
        end;
   end;
 
   procedure menu;
   var
     sal : boolean;
     ted, tec : char;
   begin
      sal := false;
    repeat
       clrscr;
       writeln('     ****** Menu General ******');
       writeln;
       writeln('          1 = Entrada Examen');
       writeln('          2 = Calculo Notas');
       writeln('          3 = Ver Examenes');
       writeln('          4 = Salir');
       writeln;
       writeln('      >>> Elija Opcion <<<');
       repeat
           tec := readkey;
       until tec in['1','2','3','4'];
       clrscr;
   case tec of
 '1' : begin
      assign(f,'misexam.dat');
     {$I-} reset(f); {$I+}
        if ioresult <> 0 then
        begin
           cont := 0;
        end
      else
         begin
           cont := filesize(f) - 1;
           close(f);
         end;
         if cont < n + 1 then
         begin
          entradaexamen;
         end
       else
          begin
          writeln('  Maximas Notas Entradas Desea Anular Archivo [S/N]');
          repeat
             ted := upcase(readkey);
          until ted in['S','N'];
          if ted = 'S' then
          begin
            erase(f);
            cont := 0;
          end;
        end;
       end;
 '2' : begin
          calculonotas;
       end;
 '3' : begin
          revisarexamen;
       end;
 '4' : sal := true;
    end;
    until sal = true;
   end;
 
 
  begin
     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