Java Methods practice set

Vinnu Mukhi
Jun 4, 2021

Write a Function to convert Celsius temperature into Feherenit.

public class practice_set_methods {
static void temp(float n){
if(n==0){
System.out.println("");
}
else {
float f=(n*9/5)+32;
System.out.println(f+" Faherenit");
}
}

public static void main(String[] args) {
temp(37);
}
}
Output: 98.6 Faherenit

--

--

Vinnu Mukhi
0 Followers

I'm a Computer Science Student from Indore (India) and I'm Sharing all my learnings here.