program promedio;
uses wincrt;
var i,n,nota,acu:integer;
pro,rea:real;
begin
acu:=0;
writeln ('Cuantas notas seran procesadas');
readln (n);
for i:=1 to n do
begin
writeln ('Ingrese la nota',i);
readln (nota);
acu:=acu+nota;
end;
writeln ('La sumatoria es: ',acu);
pro:=acu/n;
rea:=(pro*20)/100;
writeln ('El promedio es: ',pro:5:2);
writeln ('Nota real: ',rea:5:2);
end.
No hay comentarios:
Publicar un comentario