Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program opcion2;
- uses crt;
- const
- maximo=30;
- type
- vector=array [1..maximo] of real;
- var
- vec:vector;
- promedio,max,min:real;
- n,i,notae:integer;
- begin
- promedio:=0.00;
- max:=1;
- min:=7;
- writeln ('Introdusca Cantidad de Notas');
- readln (n);
- if(n>0) and (n<50) then
- begin
- writeln ('Ingrese ', n , ' Notas');
- for i:=1 to n do
- readln (vec[i]);
- for i:=1 to n do
- promedio:=promedio+vec[i];
- promedio:=promedio/n;
- for i:=1 to n do
- if(vec[i]>=max) then
- max:=vec[i];
- for i:=1 to n do
- if(vec[i]<=min) then
- min:=vec[i];
- for i:=1 to n do
- if(vec[i]=7) then
- notae:=notae+1;
- writeln ('La nota promedio es: ',promedio:0:2);
- writeln ('La nota Maxima: ',max:0:2);
- writeln ('La nota Minima: ',min:0:2);
- writeln ('Cantidad de 7: ',notae);
- readln;
- end;
- writeln ('Cantidad de Alumnos Mayor a 0 y Menor a 50: ');
- readln;
- end.
Add Comment
Please, Sign In to add comment