WHAT'S NEW?
Loading...

FUNCTIONS BASED PROGRAM - convert celcius into fahrenheit

class display
{
    public static void main(String args[])
    {
        temperature ob= new temperature();
        double temp=ob.convert(25.0);
        System.out.println("The temperature in fahrenheit is = "+temp);
    }
}
class temperature
{
    double convert(double celcius)
    {
        double far=1.8*celcius+32.0;
        return far;
    }
}

0 comments:

Post a Comment