The document contains a Java program that searches for a user-specified number in a predefined array of integers. It prompts the user to enter a number, checks if that number exists in the array, and prints whether the number is present or not. The program utilizes a simple for-each loop for the search operation and employs a boolean flag to track the result.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views1 page
Pgm3
The document contains a Java program that searches for a user-specified number in a predefined array of integers. It prompts the user to enter a number, checks if that number exists in the array, and prints whether the number is present or not. The program utilizes a simple for-each loop for the search operation and employs a boolean flag to track the result.