Skip to content

Commit

Permalink
Act 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Luisa Garcia committed Nov 16, 2017
1 parent c500f85 commit cf5fd23
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 52 deletions.
Binary file added bin/AnnoBisiesto.class
Binary file not shown.
Binary file removed bin/OperadorAritmetico.class
Binary file not shown.
39 changes: 39 additions & 0 deletions src/AnnoBisiesto.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Compilación: java AnnoBisiesto.class
* Ejecución: javac AnnoBisiesto 2015
*
* Imprime:
* - Si el año de entrada es bisiesto = true o false
*
*/
public class AnnoBisiesto{


public static void main(String[] args){
int anio = Integer.parseInt(args[0]);
// Escribe tu código {

// }
System.out.println(esBisiesto(anio));
}

public static boolean esBisiesto (int anio)
{
if(anio%4 == 0){
if(anio%100==0 && anio!=400)
{
return false;
}
else
{
return true;
}
}
else{
return false;
}

}

}

52 changes: 0 additions & 52 deletions src/OperadorAritmetico.java

This file was deleted.

0 comments on commit cf5fd23

Please sign in to comment.