Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Ask the user to input a low temperature and high temperature in Celsius. Use these values to control the loop and display in table

1. Ask the user to input a low temperature and high temperature in Celsius. Use these values to control the loop and display in table format the Celsius and Fahrenheit values between the two inputs. 2. Ask the user to input a low temperature and high temperature in Fahrenheit. Use these values to control the loop and display in table format the Fahrenheit and Celsius values between the two inputs. The following is the program that they need to be added to:

public class CelToFahr{

public static void main(String[] args){ //Declare Valriables int i = 0;

System.out.println("Celsius | Fahrenheit"); System.out.println("--------+-----------");

for ( i = 0; i <= 100; i+= 10) { System.out.print(" " + i + " |");

// formula for celsius to fahrenheit conversion double sum = (i * (9.0/5.0)) + 32; System.out.printf("%5d", (int)sum ); System.out.println(); } } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions

Question

Know when firms should not offer service guarantees.

Answered: 1 week ago

Question

Recognize the power of service guarantees.

Answered: 1 week ago