Advertisement
tei123

phpostatnie

Oct 28th, 2016
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <html> <head>
  2. </head>
  3. <body>
  4. <?php
  5.  
  6. $tab = array(10);
  7. for ($i=0;$i<10;$i++)
  8. {
  9. $tab[$i]=rand(0,2);
  10.  
  11. };
  12. echo '<br>';
  13.  
  14. $tab2 = array(10);
  15. for ($i=0;$i<10;$i++)
  16. {
  17. $tab2[$i]=rand(0,2);
  18.  
  19. };
  20. sort ($tab);
  21. sort ($tab2);
  22.  
  23. if($tab==$tab2)
  24. {
  25. echo 'rowne';
  26. }
  27. else echo 'inne';
  28. echo '<br>';
  29.  
  30. for ($i=0;$i<10;$i++)
  31. {
  32. echo $tab2[$i]." ";
  33. };
  34. echo '<br>';
  35.  
  36. for ($i=0;$i<10;$i++)
  37. {
  38. echo $tab[$i]." ";
  39. };
  40.  
  41. ?>
  42. </body>
  43.  
  44. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement