Q1: Can you read this question carefully rebug and type the answers  Debug Problem 1: As an intern for The Weather Channel, you have been instructed to debug a java program that converts Celsius to Fahrenheit. If the formula runs correctly, then 12 degrees in Celsius should give 54 degrees in Fahrenheit . Here is the formula given and it might not be correctly stated in terms of () needed and the order of operations. Google a reputable site if needed.: °F = °C x 9/5 + 32 Remember that there may be more than one problem to fix. It could be that variables have an incorrect data type. It could be that the formula is not coded correctly. Also, some import statements could be missing. Copy and paste the code below in JGrasp and debug the code. Here is the code to debug: // Convert Celsius to Fahrenheit class CelsiusToFahr { public static void main (String args[]) {   Scanner keyboard = new Scanner(System.in); int celsius = 0; int fahr = 0;   System.out.println("Input the degrees in Celsius"); celsius = keyboard.nextInt();   fahr = 9/5 * celsius + 32.0; System.out.println(celsius + "degrees in celsius gives " + fahr + " degrees in fahrenheit ");     } }

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Q1: Can you read this question carefully rebug and type the answers 

Debug Problem 1:

As an intern for The Weather Channel, you have been instructed to debug a java program that

converts Celsius to Fahrenheit. If the formula runs correctly, then 12 degrees in Celsius should

give 54 degrees in Fahrenheit .

Here is the formula given and it might not be correctly stated in terms of () needed and the

order of operations. Google a reputable site if needed.:

°F = °C x 9/5 + 32

Remember that there may be more than one problem to fix. It could be that variables have an

incorrect data type. It could be that the formula is not coded correctly. Also, some import

statements could be missing.
Copy and paste the code below in JGrasp and debug the code.

Here is the code to debug:

// Convert Celsius to Fahrenheit

class CelsiusToFahr

{

public static void main (String args[])

{

 

Scanner keyboard = new Scanner(System.in);

int celsius = 0;

int fahr = 0;

 

System.out.println("Input the degrees in Celsius");

celsius = keyboard.nextInt();

 

fahr = 9/5 * celsius + 32.0;

System.out.println(celsius + "degrees in celsius gives " + fahr + " degrees in fahrenheit ");

 

 

}

}

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY