fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. Scanner reader = new Scanner(System.in);
  13. double Farenheit;
  14. double Celsius;
  15. string CorF;
  16.  
  17. System.out.println("Enter the temperature. Be sure to include either C or F ");
  18. CorF=reader.nextString();
  19. if(Corf="F")
  20. {
  21. Farenheit=reader.nextDouble();
  22.  
  23. Celsius=(Farenheit - 32.0)*5.0/9.0;
  24.  
  25. System.out.print("Farenheit entered is ");
  26. System.out.println(Farenheit);
  27. System.out.print("The equivalent in Celsius is ");
  28. System.out.print(Celsius);
  29. }
  30. else if(Corf="C")
  31. {
  32. Celsius=reader.nextDouble();
  33.  
  34. Farenheit=(Celsius + 32.0)*9.0/5.0;
  35.  
  36. System.out.print("Celsius entered is ");
  37. System.out.println(Farenheit);
  38. System.out.print("The equivalent in Farenheit is ");
  39. System.out.print(Celsius);
  40. }
  41. }
  42. }
Compilation error #stdin compilation error #stdout 0.07s 4386816KB
stdin
Standard input is empty
compilation info
Main.java:15: error: cannot find symbol
		string CorF;
		^
  symbol:   class string
  location: class Ideone
Main.java:18: error: cannot find symbol
		CorF=reader.nextString();
		           ^
  symbol:   method nextString()
  location: variable reader of type Scanner
Main.java:19: error: cannot find symbol
		if(Corf="F")
		   ^
  symbol:   variable Corf
  location: class Ideone
Main.java:30: error: cannot find symbol
		else if(Corf="C")
		        ^
  symbol:   variable Corf
  location: class Ideone
4 errors
stdout
Standard output is empty