Write a method to convert from Celsius to Fahrenheit using the following method header:// convers form Celsius to Fahrenheitpublic static double celsiusToFahrenheit (double celsius)The formula for the conversion is: Fahrenheit = ( 9/5) * Celsius +32

1 answer
Question:

Write a method to convert from Celsius to Fahrenheit using the following method header:// convers form Celsius to Fahrenheitpublic static double celsiusToFahrenheit (double celsius)The formula for the conversion is: Fahrenheit = ( 9/5) * Celsius +32

Answers

Answer:public class Main{ public static void main(String[] args) {  System.out.println(celsiusToFahrenheit(10)); } public static double celsiusToFahrenheit (double celsius){     double fahrenheit = (9/5.0) * celsius + 32;     return fahrenheit; }}Explanation:Create a method named celsiusToFahrenheit that takes one parameter, celsiusInside the method:Convert the celcius to fahrenheit using the given formula. Note that, in the formula 9/5 is integer division. You need to convert it to the double so that the result should not be 0. One solution is converting one of the int to decimal, 9/5 → 9/5.0Return the fahrenheitInside the main method:Call the celsiusToFahrenheit() with some value and print the result

Similar Solved Questions

1 answer

Why believing in yourself is so important? PLZ DONT COPY AND PASTE I NEED THIS FOR AN ESSAY!

Why believing in yourself is so important? PLZ DONT COPY AND PASTE I NEED THIS FOR AN ESSAY!...
1 answer

In a pendulum, a continuous change occurs between kinetic energy and potential energy electromagnetic energy thermal energy mechanical energy

In a pendulum, a continuous change occurs between kinetic energy and potential energy electromagnetic energy thermal energy mechanical energy...
1 answer

Question 7 of 10 What is the relationship between the nominal interest rate and the annual percentage yield (APY)? A. The nominal interest rate is calculated using the APY B. The APY is calculated using the nominal interest rate, C. The APY is the nominal interest rate divided by the number of years for which a loan is taken out. D. The nominal interest rate is the APY divided by the number of years for which a loan is taken out

Question 7 of 10 What is the relationship between the nominal interest rate and the annual percentage yield (APY)? A. The nominal interest rate is calculated using the APY B. The APY is calculated using the nominal interest rate, C. The APY is the nominal interest rate divided by the number of years...
1 answer

Drag a statement or reason to each box to complete the proof. If 5(x+6)=x+38, then x=2.

Drag a statement or reason to each box to complete the proof. If 5(x+6)=x+38, then x=2....
1 answer

What is the monomer for starch

What is the monomer for starch...
1 answer

Wtite and balence the equation for formation of so3 from so2 and oxygen gases

wtite and balence the equation for formation of so3 from so2 and oxygen gases...
2 answers

Solve each equation for the given variable?

Solve each equation for the given variable?...
1 answer

Help me ASAP PLEASE!!!

help me ASAP PLEASE!!!...
1 answer

How did the growth of the railroads affect supply and demand for natural resources in thw US

how did the growth of the railroads affect supply and demand for natural resources in thw US...
2 answers

Consider the linear function f(x)= 3x - 1. Find the value of x when f(x)=-4, f(x)=8, f(x)=0.

Consider the linear function f(x)= 3x - 1. Find the value of x when f(x)=-4, f(x)=8, f(x)=0....
1 answer

Can I get some help please? ASAP Solve for X. for both equations pleaseee​

Can I get some help please? ASAP Solve for X. for both equations pleaseee​...
2 answers

The Yucatan Peninsula was home to the _____________. a. Aztecs c. Incas b. Mayans d. none of the above Please select the best answer from the choices provided A B C D

The Yucatan Peninsula was home to the _____________. a. Aztecs c. Incas b. Mayans d. none of the above Please select the best answer from the choices provided A B C D...
2 answers

Each table in a library can seat up to 5 people. There are enough tables for 75 people. How many tables are there in the library?​

Each table in a library can seat up to 5 people. There are enough tables for 75 people. How many tables are there in the library?​...
1 answer

The british troops had chosen to travel by water through the

the british troops had chosen to travel by water through the...
1 answer

How long ago did water form on earth

How long ago did water form on earth...
1 answer

Open Meet and enter this code wkh-qbup-odh​

open Meet and enter this code wkh-qbup-odh​...
1 answer

What strategies did Genghis Khan NOT use to unite the empire? 10 points A. Giving promotions based on merit instead of relationships B. Incorporating conquered peoples into the group C. Dispossessing the leaders of conquered clans D. Favoring the rich and powerful of each territory he conquered

What strategies did Genghis Khan NOT use to unite the empire? 10 points A. Giving promotions based on merit instead of relationships B. Incorporating conquered peoples into the group C. Dispossessing the leaders of conquered clans D. Favoring the rich and powerful of each territory he conquered...
1 answer

Could you help me with this question I am finding it a little bit hard.

Could you help me with this question I am finding it a little bit hard....

-- 0.010704--