The document provides a Java program that demonstrates the use of if statements to determine whether a number is even or odd. It utilizes the Scanner class to take user input and checks the number using a conditional statement. The program outputs whether the entered number is even or odd based on the condition evaluated.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
6 views
Practical3Java
The document provides a Java program that demonstrates the use of if statements to determine whether a number is even or odd. It utilizes the Scanner class to take user input and checks the number using a conditional statement. The program outputs whether the entered number is even or odd based on the condition evaluated.