Advertisement
Borzyk

Untitled

Jul 8th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1.  
  2. $y = explode(' ',$x);
  3. $c=count($y);
  4. for($i=0;$i<$c;$i++) {
  5.  
  6. $q=0;
  7. for($j=0;$j<$c;$j++){
  8.  
  9. if($i==$j&&!($j==($c-1))){
  10. $j++;
  11.  
  12. if($i==$j&&($j==($c-1))){
  13. $i++;
  14. $j=0;
  15.  
  16. if($i==$j&&($i==($c-1))&&($j==($c-1))){
  17. echo "to koniec obliczania";
  18. } } }
  19. else{
  20. if($y[$i]==$y[$j]){
  21.  
  22. $q++;
  23.  
  24.  
  25. /*/if($h[$i]==$y[$i]){
  26. $j++;
  27. } */
  28.  
  29. }
  30. }
  31. }
  32. echo "$q ";
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement