-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Luisa Garcia
committed
Nov 16, 2017
1 parent
c500f85
commit cf5fd23
Showing
4 changed files
with
39 additions
and
52 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
This file was deleted.
Oops, something went wrong.