Ejercicio05.java 668 Bytes
Newer Older
roshka committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ejercicios;

import java.util.Scanner;

/**
 *
 * @author roshka
 */
public class Ejercicio05 {
    public static void main(String[] args){
        int valor;
        Scanner scn = new Scanner(System.in);
        System.out.println("Ingrese su valor");
        valor = scn.nextInt();
        if (valor%2 == 0 ) {
            System.out.println("El numero es divisible por 2");
        }else{
            System.out.println("El numero no es divible por 2");
        }
    }
}