UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Propuesto 08


08.-GRADOS FAHRENHEIT  A CELSIUS Y KELVIN

Resultado de imagen para GRADOS FAHRENHEIT

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package problema18;
import java.io.*;
/**
 *
 * @author abel montalvan
 */
public class Problema18 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
         
         double f,k,c;
     
BufferedReader in =new BufferedReader(new  InputStreamReader(System.in));
 System.out.println("Grados Fahrenheit: ");
    f=Integer.parseInt(in.readLine());
    
    c  = (f-32)/1.8;
    k = (f-32)*5/9+273.15;
           
 System.out.println("");
 System.out.println("A grados Celsius: "+c);
 System.out.println("A grados Kelvin: "+k);


    }
}

       
      

No hay comentarios:

Publicar un comentario