porque la nota mínima me sale cero
Publicado por Martín (6 intervenciones) el 16/05/2020 01:10:43
Saben porque la nota minima me sale cero
Esta es el algoritmo
Esta es el algoritmo
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
program Notas;
var
nota,cuenta,m,suma,numero,max,min:integer;
promedio:real;
begin
suma:=0;
cuenta:=0;
promedio:=0;
min:=numero;
max:=numero;
writeln('Notas de examenes');
write('Cuantas notas desea ingresar:');
readln(m);
for cuenta :=1 to m do
begin
write('Ingrese la nota ', cuenta,':');
readln(numero);
if(numero>=0) and (numero<=10)then
else
begin
write('Ingrese una nota correcta:');
readln(numero);
end;
if (numero > max) then
max:=numero
else
begin
if (numero < min) then
min:=numero
end;
suma:=suma+numero;
end;
promedio:=suma/m;
writeln('Nota maxima: ',max);
writeln('Nota minima: ',min);
writeln('El promedio de las notas ingresadas es: ',promedio:4:2);
readln;
end.
Valora esta pregunta
0