1. Write a Java program to check if a number is even or odd. solution : import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter a number: "); int num = input.nextInt(); if (num % 2 == 0) { System.out.println(num + " is even."); } else { System.out.println(num + " is odd."); } } } 2. Write a Java program to find the largest among three numbers. solution: import java.util.Scanner; public class Main { ...
Life = Learn().Explore().Renew();