Computer Science, asked by bharatchajed5, 9 months ago


Suppose x is an array of type int[] with 50 elements. Write a code segment that will count and print the frequency of
number 42 in the array​

Answers

Answered by aayushkumar987186319
1

good afternoon my friend is looking to move in on a regular customer

l

Answered by sushilraina9797
0

int c = 0;

for(int i = 0; i < 50; i++)

{

if( x[i] == 42)

{

c++;

}

}

System. out. println("Frequency of 42=" + c) ;

Similar questions