subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:30
The method of presentation refers to the planning process for the presentation. the information chosen for the presentation. how the presentation topic will be introduced. how the presentation will be delivered.
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
How do i delete my account on this because i didn't read this agreements and also i put age at xd
Answers: 1
question
Computers and Technology, 23.06.2019 21:20
For positive constants a and b, the force between two atoms in a molecule is given f(r) = −a r2 + b r3 , where r > 0 is the distance between the atoms. note: a and b are upper case letters. (a) find f '(r) = (b) find the critical point for f(r). r = (c) find f ''(r) = (d) find the value of r so that f ''(r) = 0.
Answers: 1
You know the right answer?
Fix all compilation errorsfor this JAVA program //
// Debugging Problem
import java. ut...
Questions
question
Mathematics, 19.06.2020 21:57
Questions on the website: 13722363