subject
Engineering, 19.11.2019 02:31 mia1518

Assign nummatches with the number of elements in uservalues that equal matchvalue. uservalues has num_vals elements. ex: if uservalues is {2, 1, 2, 2} and matchvalue is 2 , then nummatches should be 3. your code will be tested with the following values: uservalues: {2, 1, 2, 2}, matchvalue: 2 uservalues: {0, 0, 0, 0}, matchvalue: 0 uservalues: {20, 50, 70, 100}, matchvalue: 10 import java. util. scanner; public class findmatchvalue { public static void main (string [] args) { scanner scnr = new scanner(system. in); final int num_vals = 4; int[] uservalues = new int[num_vals]; int i; int matchvalue; int nummatches = -99; // assign nummatches with 0 before your for loop matchvalue = scnr. nextint(); for (i = 0; i < uservalues. length; ++i) { uservalues[i] = scnr. nextint(); } /* your solution goes here */ system. out. println("matchvalue: " + matchvalue + ", nummatches: " + nummatches); } }

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 12:10
On a average work day more than work place firs are reorted
Answers: 1
question
Engineering, 04.07.2019 18:10
The drive force for diffusion is 7 fick's first law can be used to solve the non-steady state diffusion. a)-true b)-false
Answers: 1
question
Engineering, 04.07.2019 18:10
Water at the rate of 1 kg/s is forced through a tube with a 2.5 cm inner diameter. the inlet water temperature is 15°c, and the outlet water temperature is 50°c. the tube wall temperature is 14°c higher than the local water temperature all along the length of the tube. what is the length of the tube?
Answers: 3
question
Engineering, 04.07.2019 18:20
Apiston-cylinder device contains 0.1 m3 of liquid water and 0.9 m3 of water vapor in equilibrium at 800 kpa. heat is transferred at constant pressure until the temperature of water reaches 350 °c. determine (a) the quality of water at the initial state (b) the work associated with this process, (c) the heat associated with this process.
Answers: 2
You know the right answer?
Assign nummatches with the number of elements in uservalues that equal matchvalue. uservalues has nu...
Questions
question
Mathematics, 28.07.2019 19:00
question
Mathematics, 28.07.2019 19:00
question
Chemistry, 28.07.2019 19:00
question
Mathematics, 28.07.2019 19:10
question
Mathematics, 28.07.2019 19:10
Questions on the website: 13722361