SHARE
TWEET

Untitled

a guest Jan 5th, 2016 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. // error_reporting(-1);
  4.  
  5. $anonDice1 = mt_rand(1,6);
  6. $anonDice2 = mt_rand(1,6);
  7.  
  8. $compDice1 = mt_rand(1,6);
  9. $compDice2 = mt_rand(1,6);
  10.  
  11. echo "У анона выпало {$anonDice1} и {$anonDice2}\n У компьютера {$compDice1} и {$compDice2}\n";
  12.  
  13. /* Находим сумму чисел */
  14.  
  15. $anonSum = ($anonDice1 + $anonDice2);
  16. $compSum = ($compDice1 + $compDice2);
  17.  
  18. if (($anonDice1 == $anonDice2) && ($compDice1 == $compDice2)) {
  19.     echo "2 дабла - тебя ждёт большая удача. Запости скриншот!\n";
  20.     exit();
  21. }
  22.  
  23. if ($anonSum > $compSum) {
  24.     echo "Победил анон";
  25. }
  26. if ($anonSum < $compSum) {
  27.     echo "Победил компьютер";
  28. }
  29. If ($anonSum == $compSum) {
  30.     echo "Ничья";
  31. }
  32.     exit();
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