/*
	This is a searchArray

*
*/

import java.util.*;

public class SearchArray
{
	public static void main(String[] args)
	{
		Scanner key = new Scanner(System.in);
		
		// Initialization Array
		int[] score = {100, 98, 70, 80, 60, 45};
		int result;
		
		System.out.println("What score do you want to search for? ");
		int test = key.nextInt();
		
		/*
			Pass the array and the target into search
			Assign it to result
			
		*
		*/
		
		result = search(score, test);
		
		// else-if statment for decision making
		
		if(result==1)
		{
			System.out.println("Sorry no test score were found..");
			
		}
		else if(result==0)
		{
			System.out.println("Yes, " + test + " exists");
			
		}
	}
	
	/*
		 This method will help us to do the search
		 If the target is found it will return 0
		 
	*
	*/
	
	public static int search(int[] array, int test)
	{
		int num = 1;
		
		for(int i=0; i<array.length; i++)
		{
			if(array[i] == test)
			{
				num = 0;
			}
		}
		
		return num;		
	
	}
} 
		