Guest User

Untitled

a guest
Jul 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. int[] arr2 = new int[8] { 10, 9, 8, 9, 7, 6, 11, 5 };
  2. int temp2 = 0;
  3. for (int i = 1; i <= arr2.Length - 1; i++)
  4. {
  5. for (int j = i - 1; j <= arr2.Length - 1; j++)
  6. {
  7. if (arr2[j] > arr2[i])
  8. {
  9. temp2 = temp2 + arr2[i]+arr2[j];
  10. }
  11. }
  12. }
Add Comment
Please, Sign In to add comment