Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int cycle_5;
- int cycle_6;
- int occurance = 0;
- int pinAttempt[4];
- int TotalTime = 0;
- for( cycle_1 = 0; cycle_1 <10; cycle_1 = cycle_1 + 1)
- {
- for( cycle_2 = 0; cycle_2 <10; cycle_2 = cycle_2 + 1)
- {
- for( cycle_3 = 0; cycle_3 <10; cycle_3 = cycle_3 + 1)
- {
- for( cycle_4 = 0; cycle_4 <10; cycle_4 = cycle_4 + 1)
- {
- pinAttempt[0] = cycle_1;
- pinAttempt[1] = cycle_2;
- pinAttempt[2] = cycle_3;
- pinAttempt[3] = cycle_4;
- for ( cycle_5 = 0; cycle_5 <4; cycle_55 = cycle_5 + 1 )
- {
- for( cycle_6 = cycle_5 + 1; cycle_6 <3; cycle_6 = cycle_6 + 1 )
- {
- if(pinAttempt[cycle_5]==pinAttempt[Cycle_6})
- {
- occurance = occurance+1;
- }
- if(occurance < 3)
- {
- TotalTime = TotalTime + 4;
- }
- occurance = 0;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement