subject

Java zybookschallengeactivity6.4.2: finding values in an array. set nummatches to the number of elements in uservalues (having num_vals elements) that equal matchvalue. ex: if matchvalue = 2 and uservalues = {2, 2, 1, 2}, then nummatches = 3. (notes)must be used template: import java. util. scanner; public class findmatchvalue {public static void main (string [] args) {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 loopuservalues[0] = 2; uservalues[1] = 2; uservalues[2] = 1; uservalues[3] = 2; matchvalue = 2; /* your solution goes here */system. out. println("matchvalue: " + matchvalue + ", nummatches: " + nummatches); }}

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:30, angoraspinner
These tools give presenters more freedom to move about the room and interact with their audience. laptop computer laser pointer lcd projector remote control
Answers: 2
image
Computers and Technology, 23.06.2019 13:50, mrfishyyyy
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, victordhernandez01
Jake really works well with numbers and is skilled with computers but doesn't work well with others. which of the jobs discussed in this unit might be best for jake? why?
Answers: 3
image
Computers and Technology, 24.06.2019 12:00, exoticbunnylover123
Which spreadsheet operation does a look function perform?
Answers: 1
You know the right answer?
Java zybookschallengeactivity6.4.2: finding values in an array. set nummatches to the number of ele...

Questions in other subjects:

Konu
Mathematics, 23.09.2019 05:30
Konu
Social Studies, 23.09.2019 05:30