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
1
Expert's answer
2017-02-23T14:13:05-0500
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 the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS