Advertisement
Guest User

Untitled

a guest
Mar 17th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. for (int i = 0; i < nums.Length - 1; i += 3)
  2. {
  3. sums[sumsIndex] = int.Parse(nums[i]) + int.Parse(nums[i + 1] + int.Parse(nums[i + 2]));
  4.  
  5. sums[sumsIndex] = sums[sumsIndex] / 4;
  6.  
  7. sumsIndex++;
  8. }
  9. int diff = 0;
  10. for (int j = 0; j < sums.Length - 1; j++)
  11. {
  12. if (Math.Abs(sums[j] - sums[j + 1]) > diff)
  13. {
  14. diff = Math.Abs(sums[j] - sums[j + 1]);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement