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, 21.06.2019 20:00
2.)how does a graphical user interface (gui) on a touchscreen interface differ from a gui on a desktop or laptop? a.)a finger or stylus is used instead of a pointer. b.) a magic wand is used instead of a pointer. c.)users speak commands instead of using a pointer. d.)users visualize commands instead of using a pointer.
Answers: 1
question
Computers and Technology, 21.06.2019 22:00
You should try to photograph people on bright sunny days because the light will be best a) true b) false
Answers: 1
question
Computers and Technology, 22.06.2019 06:00
The width of a piece of rectangular land is 5m shorter rhan 1/3 of its length .find the width of the land if the length is 60m,150m.
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
The blank button automatically displays next to the data when you select a range of numeric data which is an available option for creating a chart
Answers: 3
You know the right answer?
Here is the question: assuming int numbers[size]; is initialized somehow, write a function counter(...
Questions
question
Mathematics, 09.11.2019 05:31
question
Geography, 09.11.2019 05:31
Questions on the website: 13722363