Monday, December 7, 2015

Java program to demonstrate IfElse condition

Java program to demonstrate IfElse condition:
package javaapplication22;

import java.util.Scanner;
public class IfElseDEmo {
   
   
    public static void main(String[] args) {
        Scanner obj= new Scanner(System.in);
        int input = obj.nextInt();
       
        if(input>=40){
            System.out.println("pass");
        }else{
            System.out.println("Fail");
        }
       
    }
   
   
   
   
}

0 comments:

Post a Comment