Q:

Bisiesto java

import java.util.Scanner;

public class Bisiesto {

	public static void main(String[] args) {
		Scanner teclado = new Scanner(System.in);
		
		//D
		
		int ano = 0;
		String msg = "Introduza un ano: ";
		
		//E
		
		System.out.println(msg);
		ano = teclado.nextInt();
		
		//P
		
		if ((ano%400 == 0) && (ano%100 != 0|| ano%400 == 0)){
			msg = "es";
		}
		else {
			msg = "no es";
		}
		
		//S

		System.out.println(msg);
	}

}
0

New to Communities?

Join the community