Código Java – Temperatura (Fahrenheit / Celsius)

// Codificado por Beastieux import javax.swing.JOptionPane; public class DSCTemperatura { /* La relación entre grados Celsius (C) y grados Fahrenheit (F) es la siguiente: F - 32 = 1,8 * C */ double FahrenheitCelsius(double grado) { double gCelsius = (grado - 32) / 1.8; return gCelsius; } double CelsiusFahrenheit(double grado) { double gFahrenheit = (grado … Continuar leyendo Código Java – Temperatura (Fahrenheit / Celsius)

Código Java – Temperatura Mensual

// Codificado por: Beastieux import javax.swing.*; public class SyGTemperaturaMensual { static int MAX = 5; int tempSup = 25; int[] almacenaArray() { int[] arreglo = new int[MAX]; String cadena; for (int i = 0; i < MAX; i++) { do { cadena = JOptionPane.showInputDialog("Ingrese Temperatura " + (i + 1) + " : "); arreglo[i] … Continuar leyendo Código Java – Temperatura Mensual