-
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.
feat: Actividad de tomando deciciones 2
- Loading branch information
Showing
3 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
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,17 @@ | ||
public class Decisiones { | ||
|
||
public static void main(String[] args) { | ||
|
||
int fechaLanzamiento = 1999; | ||
boolean incluidoEnElPlan = true; | ||
double notaDeLaPelicula = 8.2; | ||
|
||
if (fechaLanzamiento >= 2022) { | ||
System.out.println("Peliculas populares"); | ||
} else { | ||
System.out.println("Pelicula Retro que aun vale la pena ver"); | ||
} | ||
|
||
} | ||
|
||
} |
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 |
---|---|---|
@@ -1,6 +1,30 @@ | ||
public class Main { | ||
public static void main(String[] args) { | ||
|
||
System.out.println("Hello world!"); | ||
System.out.println("Bienvenido a Screem Matrix!"); | ||
System.out.println("Pelicula: Matrix"); | ||
|
||
int fechaLanzamiento = 1999; | ||
|
||
boolean incluidoEnElPlan = true; | ||
|
||
double notaDeLaPelicula = 8.2; | ||
|
||
double media = 8.2 + 6.0 + 9.0 / 3; | ||
|
||
System.out.println("Media: " + media); | ||
|
||
String sipnosis = """ | ||
Matrix es una paradoja | ||
La mejor pelicula del fin del milenio | ||
Fue lanzada en: | ||
""" + fechaLanzamiento; | ||
|
||
System.out.println(sipnosis); | ||
|
||
int clasificacion = (int) (media / 2); | ||
|
||
System.out.println("Clasificacion: " + clasificacion); | ||
|
||
} | ||
} |
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,21 @@ | ||
public class Temperatura { | ||
|
||
public static void main(String[] args) { | ||
|
||
System.out.println("Conversor de grados Celsius a Fahrenheit"); | ||
|
||
int temperatura = 30; | ||
|
||
int resultado = (int) (temperatura * 1.8) + 32; | ||
|
||
System.out.println( | ||
String.format("La temperatura de %d en grados farenheit a Celsius es %d", temperatura, resultado)); | ||
|
||
System.out.println(""" | ||
La temperatura de %d | ||
Conversor de grados Fahrenheit a Celsius | ||
El resultado es %d | ||
""".formatted(temperatura, resultado)); | ||
|
||
} | ||
} |