Saturday, 7 September 2013

Java Program to convert Celsius to Fahrenheit

class Temperature
{
    public static void main(String args[])
    {
        float f,c;
        c=Integer.parseInt(args[0]);
        f = 32 + 9*c/5;
        System.out.println("Celsius to Fahrenheit"+f);
    }
}


Output:



No comments:

Post a Comment