subject

I get an error message on my code below. How can I fix it? import java. util. Scanner;

public class CelsiusToFahrenheit {

public static void main (String [] args) {
Scanner scnr = new Scanner(System. in);

double tempF;
double tempC;

System. out. println("Enter temperature in Celsius: ");
tempC = scnr. nextDouble();

System. out. print("Fahrenheit: ");
System. out. println(tempF);
return;
}
}

CelsiusToFahrenheit. java:16: error: variable tempF might not have been initialized
System. out. println(tempF);
^
1 error

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
What is the algorithm for building a binary tree program
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Suppose you have 9 coins and one of them is heavier than others. other 8 coins weight equally. you are also given a balance. develop and algorithm to determine the heavy coin using only two measurements with the of the balance. clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
The ieee 802.11: defines standards for wireless local area network (wlan) communication protocols. identifies various computers or devices connected to a network. verifies any resource attached to another computer on a network that is different from the computer to which the user is logged on. connects multiple local area networks (lans) and wide area networks (wans).
Answers: 2
question
Computers and Technology, 24.06.2019 08:30
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
Answers: 2
You know the right answer?
I get an error message on my code below. How can I fix it? import java. util. Scanner;

...
Questions
question
Mathematics, 16.10.2019 00:40
question
Mathematics, 16.10.2019 00:40
question
Mathematics, 16.10.2019 00:40
Questions on the website: 13722361