daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest May 16th, 2018 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program opcion2;
  2. uses crt;
  3. const
  4. maximo=30;
  5. type
  6. vector=array [1..maximo] of real;
  7. var
  8. vec:vector;
  9. promedio,max,min:real;
  10. n,i,notae:integer;
  11.  
  12. begin
  13. promedio:=0.00;
  14. max:=1;
  15. min:=7;
  16.  
  17. writeln ('Introdusca Cantidad de Notas');
  18. readln (n);
  19. if(n>0) and (n<50) then
  20. begin
  21. writeln ('Ingrese ', n , ' Notas');
  22. for i:=1 to n do
  23. readln (vec[i]);
  24.  
  25.  
  26. for i:=1 to n do
  27. promedio:=promedio+vec[i];
  28. promedio:=promedio/n;
  29.  
  30. for i:=1 to n do
  31. if(vec[i]>=max) then
  32.  max:=vec[i];
  33.  
  34.  for i:=1 to n do
  35. if(vec[i]<=min) then
  36.  min:=vec[i];
  37.  
  38.   for i:=1 to n do
  39. if(vec[i]=7) then
  40.  notae:=notae+1;
  41.  
  42. writeln ('La nota promedio es: ',promedio:0:2);
  43. writeln ('La nota Maxima: ',max:0:2);
  44. writeln ('La nota Minima: ',min:0:2);
  45. writeln ('Cantidad de 7: ',notae);
  46. readln;
  47. end;
  48. writeln ('Cantidad de Alumnos Mayor a 0 y Menor a 50: ');
  49. readln;
  50. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top