I have been trying to write a celsius to fahrenhiet conversion program that also uses a loop function. I have tried compiling what I have but I end up with 12 errors but they all seem to be in the same line. If anyone would please help me out on trying to find my errors. Thanks in advance for any help given.
/*****************************************************************
* Tempconversion2.java
* Corie
*
* This program prints Temp Converisions.
*****************************************************************/
import java.util.Scanner;
public class Tempconversion2
{
public static void main(String[] args)
{
Scanner stdIn = new Scanner (System.in);
double Temp ; // degrees in Celsius
double Conversion = (1.8 * Celsius) + 32; // temperature in Fahrenhiet
char response; // user's y/n response
System.out.print ("Enter Temperature In Celsius: ");
Temperature = stdIn.nextDouble();
System.out.print ("Would you like to try anymore conversions? (Y/N): ");
response = stdIn.next() .charAt (0);
} while (response == 'y' || response == 'Y');
System.out.println ("Temperature in Celsius converts to " + Conversion);
} //end main
} // end class Tempconversion2
All errors seem to be on line 22.

New Topic/Question
Reply




MultiQuote








|