Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(i = 1; i<=n; i++)
- for(j = 1; j<n; j++)
- {
- if(array2[j] != 2)
- pushStack(s, array1[i]);
- if(j == n-1 && array2[j] != 2)
- {
- pushStack(s, array1[i]);
- pushStack(s, array1[i+1]);
- }
- if(array2[j] == 2)
- {
- cho = array1[i]*array1[i+1];
- if(array2[j+1] == 2)
- {
- cho = cho*array1[i+2];
- pushStack(s, cho);
- }
- if(array2[j+1] != 2)
- pushStack(s, cho);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment