about | help | code help+videos | done | prefs |
sumOf1stAnd2ndEquals3rd
public boolean sumOf1stAnd2ndEquals3rd(int[] nums)
public boolean sumOf1stAnd2ndEquals3rd(int[] nums) { boolean equals = false; int sum = nums[0] + nums[1]; if (sum == nums[2]) { equals = true; } return equals; } sumOf1stAnd2ndEquals3rd([1, 2, 3]) → true sumOf1stAnd2ndEquals3rd([6, 7, 13]) → true sumOf1stAnd2ndEquals3rd([1, 2, 4]) → false ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 1
Copyright Nick Parlante 2017 - privacy