Equal Number Program in Java


import java.util.Scanner;
public class EqualNumber
{
    public static void main(String[] args)
    {
        int n;
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter a number=");
        n = sc.nextInt();
        if (n == 10)
        {
            System.out.println("n is equal to 10.");
        }
    }
}


Output:

Enter a number=10
n is equal to 10.
b. tech. bca icse java java tutorials learn java mca programs