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 18:10
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
question
Engineering, 04.07.2019 18:20
Atank with constant volume contains 2.27 kg of a mixture of water phases (liquid-vapor). in the initial state the temperature and the quality are 127 °c and 0.6, respectively. the mixture is heated until the temperature of 160 oc is reached. illustrate the process in a t-v diagram. then, determine (1) the mass of the vapor in kg at the initial state, (2) the final pressure in kpa.
Answers: 3
question
Engineering, 04.07.2019 19:10
An electric kettle is made out of stainless steel, weighs two pounds (when empty) and is equipped with a heating element that consumes 2 kw of electricity. assuming that the water and the kettle are at the same uniform temperature at any moment of time, calculate the shortest possible time to bring 2 quarts of water from room temperature to the onset of boiling
Answers: 2
question
Engineering, 04.07.2019 19:20
Liquid flows at steady state at a rate of 2 lb/'s through a pump, which operates to raise the elevation of the liquid 100 ft from control volume inlet to exit. the liquid specific enthalpy at the inlet is 40.09 btu/lb and at the exit is 40.94 btub. the pump requires 3 btu/s of power to operate. if kinetic energy effects are negligible and gravitational acceleration is 32.174 tt/s, the heat transfer rate associated with this steady state process is most closely 1)-2,02 btu/s from the liquid to the surroundings 2)-3.98 btu/s from the surroundings to the liquid. 3)-4.96 btu/s from the surroundings to the liquid. 4)-1.04 btu/s from the liquid to the surroundings.
Answers: 2
You know the right answer?
Assign nummatches with the number of elements in uservalues that equal matchvalue. uservalues has nu...
Questions
question
Chemistry, 04.08.2019 14:20
question
Business, 04.08.2019 14:20
question
Mathematics, 04.08.2019 14:20
Questions on the website: 13722367