Answer:
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 */
numMatches = 0;
for (i = 0; i < userValues.length; ++i) {
if(userValues[i] == matchValue) {
numMatches++;
}
}
System.out.println("matchValue: " + matchValue + ", numMatches: " + numMatches);
}
}
Answer:
The conversion factor is 0.00223 ( 1 gallon per minute equals 0.00223 cubic feet per second)
Explanation:
Since the given volume flow rate is gallons per minute.
We know that 1 gallon = 3.785 liters and
1 minute = 60 seconds
Let the flow rate be 
Now replacing the gallon and the minute by the above values we get

Thus 
Now since we know that 1 liter = 
Using this in above relation we get

From the above relation we can see that flow rate of 1 gallons per minute equals flow rate of 0.00223 cubic feet per second. Thus the conversion factor is 0.00223.