Advertisement
Guest User

gh

a guest
Jan 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. int cycle_5;
  2. int cycle_6;
  3.  
  4. int occurance = 0;
  5.  
  6.  
  7. int pinAttempt[4];
  8. int TotalTime = 0;
  9.  
  10. for( cycle_1 = 0; cycle_1 <10; cycle_1 = cycle_1 + 1)
  11. {
  12. for( cycle_2 = 0; cycle_2 <10; cycle_2 = cycle_2 + 1)
  13. {
  14. for( cycle_3 = 0; cycle_3 <10; cycle_3 = cycle_3 + 1)
  15. {
  16. for( cycle_4 = 0; cycle_4 <10; cycle_4 = cycle_4 + 1)
  17. {
  18. pinAttempt[0] = cycle_1;
  19. pinAttempt[1] = cycle_2;
  20. pinAttempt[2] = cycle_3;
  21. pinAttempt[3] = cycle_4;
  22. for ( cycle_5 = 0; cycle_5 <4; cycle_55 = cycle_5 + 1 )
  23. {
  24. for( cycle_6 = cycle_5 + 1; cycle_6 <3; cycle_6 = cycle_6 + 1 )
  25. {
  26. if(pinAttempt[cycle_5]==pinAttempt[Cycle_6})
  27. {
  28. occurance = occurance+1;
  29. }
  30. if(occurance < 3)
  31. {
  32. TotalTime = TotalTime + 4;
  33. }
  34. occurance = 0;
  35. }
  36. }
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement