66 940
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #65451 in Java | JSP | JSF for gazibo

Question #65451
4. Write a program that allows user to convert Celsius to Fahrenheit. Displays the output of Celsius to Fahrenheit in a table. Entries in the table should range from 10 to 100 degrees Celsius with increments of 2 degrees.
• The formula f= (9/5 * c) + 32 converts Celsius to Fahrenheit.
The result format should have one decimal place. Example 3.3 @ 4.5
Expert's answer
public class CelsiusToFahrenheit {

public static void main(String[] args) {
double f;
for (int i = 10; i <= 100; i += 2) {
f = (9.0 / 5.0 * i) + 32;
System.out.print("Celsius = " + i + " Fahrenheit = ");
System.out.printf("%.1f", f);
System.out.println("");

}
}

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions