Skip to content

Commit

Permalink
feat: Actividad de tomando deciciones 2
Browse files Browse the repository at this point in the history
  • Loading branch information
wanferno committed Dec 7, 2024
1 parent 885060c commit 29cac98
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/Decisiones.java
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");
}

}

}
26 changes: 25 additions & 1 deletion src/Main.java
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);

}
}
21 changes: 21 additions & 0 deletions src/Temperatura.java
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));

}
}

0 comments on commit 29cac98

Please sign in to comment.