Saturday, 7 February 2015

Exercise-4: How to use If Else Statement in Java Programming

package ifelse;
import java.util.Scanner;

public class Ifelse {
   
    public static void main(String[] args) {
       
        Scanner input = new Scanner(System.in);       
        System.out.print("Plz enter your digit number ");
       
        int value = input.nextInt();
       
        if(value>=20 && value <=25)
        {
            System.out.println("This is my choose value ");      
        }
        else
        {
            System.out.println("This is my not choose value ");
        }
    }
   
}

No comments:

Post a Comment