Aim :- Write a Java Program That Converts from Celsius to Fahrenheit and Fahrenheit to Celsius.
Java Program :
import java.util.*;
class p4_3{
public static void main(String args[])
{
convert c=new convert();
float temp=c.ctof(50);
System.out.println("The Celcius to Fahrenheit: "+c.ctof(50));
System.out.println("The Fahrenheit to Celcius: "+c.ftoc(50));
}
}
class convert{
float ctof(float c)
{
return (c+32);
}
float ftoc(float f)
float ftoc(float f)
{
return (f-32);
}
}
2 Comments
ridiuur-po Christy Smith https://marketplace.visualstudio.com/items?itemName=5cetanul-ki.TeamJumpers-2--New-Reality-gratuita
ReplyDeleteocunaqal
glicaspal-bi Paul Calhoun https://www.sleepid.co.uk/profile/The-Dark-Secrets-Of-Tonhi-Movie-Online-With-English-Subtitles-Download-LINK-Torrent/profile
ReplyDeletenyalykuli