Programa.dpr 347 B

1234567891011121314151617181920212223242526
  1. program Programa;
  2. {$APPTYPE CONSOLE}
  3. var
  4. f, suma, valor: Integer;
  5. promedio: Double;
  6. begin
  7. suma := 0;
  8. for f := 1 to 10 do
  9. begin
  10. write('Ingrese un valor: ');
  11. ReadLn(valor);
  12. suma := suma + valor;
  13. end;
  14. promedio := suma / 10;
  15. WriteLn('La suma es: ', suma);
  16. WriteLn('El promedio es: ', promedio:0:2);
  17. ReadLn;
  18. end.