subject
Computers and Technology, 07.12.2019 01:31 erykp17

Here is the question: assuming int numbers[size]; is initialized somehow, write a function counter() that you an send the array to, plus an extra integer, and the function will return the number of times that value is found in the array. for example, if the array of size 7 contains {1,2,3,2,3,3,3} then the call
x=counter(numbers, size,3); will put 4 into x.
my try-
int integer;
int count=0;
cin > > integer;
int counter(numbers, size, integer)
for(int i=0; i while(i if numbers[i] = integer
count++;
while(i=size)
cout < < count;
okay i think this ^^ is close to the right idea but i know its still wrong. ?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
question
Computers and Technology, 23.06.2019 13:30
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
The keyboard usually has six rows of keys. which of the following is not one of the key group categories? letter keys number keys control keys graphic keys
Answers: 1
question
Computers and Technology, 25.06.2019 04:30
You can fit more raw files on a memory card than the jpeg files? truefalse
Answers: 1
You know the right answer?
Here is the question: assuming int numbers[size]; is initialized somehow, write a function counter(...
Questions
question
Social Studies, 23.07.2019 05:00
question
Mathematics, 23.07.2019 05:00
Questions on the website: 13722363