Ver Mensaje Individual
  #2  
Antiguo 25-04-2004
Avatar de jachguate
jachguate jachguate is offline
Miembro
 
Registrado: may 2003
Ubicación: Guatemala
Posts: 6.254
Reputación: 28
jachguate Va por buen camino
Cita:
Empezado por delphi help
The value of x div y is the value of x/y rounded in the direction of zero to the nearest integer.
The mod operator returns the remainder obtained by dividing its operands. In other words, x mod y = x – (x div y) *
y.
como dicen que un ejemplo dice mas que mil palabras...

50 div 12 => 4
50 mod 12 => 2

50 div 10 => 5
50 mod 10 => 0

en una división de aquellas de primaria... con el simbolito |_______

div devuelve el "resultado" entero de la división, y mod el residuo.

Hasta luego.

__________________
Juan Antonio Castillo Hernández (jachguate)
Guía de Estilo | Etiqueta CODE | Búsca antes de preguntar | blog de jachguate
Responder Con Cita