SHARE
TWEET

Untitled

a guest Jan 14th, 2020 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $cantidadPedida = 3;
  3. $factorCantidadPedida = 10;
  4. // 30
  5.  
  6. $factorUnidadLeida = 5;
  7. $cantidadLeida = 4;
  8. $resultadoFactorLeido = $factorUnidadLeida * $cantidadLeida;
  9. // 10
  10.  
  11.  
  12. // $resultadoFactorLeido es multiplo o divisor de $factorCantidadPedida?
  13.  
  14.  
  15. if($resultadoFactorLeido % $factorCantidadPedida == 0){
  16.     echo 'Es divisible';
  17. }else{
  18.     echo 'No es divisible';
  19. }
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