package com.Method;
import java.util.Scanner;
public class test1 {
// 使用数组作为方法参数
public void printArray(int arr[], int i) {
int a = 0;
for (int n : arr) {
if (n == i)
a++;
}
if(a==0) System.out.println("一次都没找到");
else System.out.println("找到了" + a + "次");
}
public static void main(String[] args) {
// TODO Auto-generated method stub
test1 one=new test1();Scanner sc=new Scanner(System.in);
int array[]=new int [5];
//输入数组
for(int i=0;i<5;i++) {
array[i]=sc.nextInt();
}
//输入要找的数
int i=sc.nextInt();
one.printArray(array,i);
}
}