Computers and Technology

Fix all compilation errorsfor this JAVA program //
// Debugging Problem
import java. util. Scanner;
public class Temperature
{ public static void main( String args[] )
{
int option;
int degree1;
int celsius1;
int fahrenheit1;
Scanner input = new Scanner( System. in );
option = 0;
While ( option != 3 )
System. out. printf( "%s\n%s\n%s\n", "1 for Fahrenheit to Celsius",
"2 for Celsius to Fahrenheit", "3 to quit:" );
option = input. nextDouble();
System. out. println( "Enter the degrees in Fahrenheit: " );
degree1 = input. nextDouble();
celsius1 = ( degree1 - 32 ) * 5 / 9;
System. out. printf( "The temp in Celsius is %d\n", celsius1 );
if ( option == 2 );
System. out. println( "Enter the degrees in Celsius: " );
degree1 = input. nextDouble();
fahrenheit1 = ( degree1 * 9 / 5 ) + 32;
System. out. printf( "The temp in Fahrenheit is %d\n", fahrenheit1 );
} // end while loop
} // end method Main
} // end class Temperature

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:00, daniella0123
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
image
Computers and Technology, 23.06.2019 15:00, ryleerose255
Idon’t understand the double8 coding problem. it is java
Answers: 1
image
Computers and Technology, 24.06.2019 03:30, live4dramaoy0yf9
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
image
Computers and Technology, 24.06.2019 10:50, latresyn
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
Do you know the correct answer?
Fix all compilation errorsfor this JAVA program //
// Debugging Problem
import java. ut...

Questions in other subjects:

Konu
Mathematics, 25.03.2021 19:00
Konu
Mathematics, 25.03.2021 19:00
Konu
Social Studies, 25.03.2021 19:00