Skip to main content

converson temperatura Java

import java.util.*;
public class FuncionDeCentigrados_a_Fahrenheit {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int numero, temperatura=0, fahrenheit=0;
 
        System.out.print("Temperatura en Grados Centigrados: ");
        temperatura=sc.nextInt();
        fahrenheit=(temperatura*9)/5+32;
        System.out.println("Temperatura en Grados Fahrenheit: "+fahrenheit);
    }
}
 
 
Fuente 

Comments

chocobo said…
http://soloinformaticayalgomas.blogspot.com/2011/04/generador-de-clases.html

generador de clases