Assninment I can do the flow chart I just need helpfiguring out why my code will not run correctly there is for a Java . I can do the flow chart on my own . Design (with a Visio flowchart) and code Programming Challenge 11. Celsius to Fahrenheit Table on p.264. Develop a 'Test Plan' in Excel and verify that your program works as expected. Submit your design flowchart, CelsiusFahrenheit.java and Test Plan files using the link below. For this program, you cannot use jOptionPane. In order to receive full credit, be sure your program includes: Top of program comments (see Resources for a checklist), meaningful comments throughout the code, proper indents/spacing and meaningful variable names at the top of the main method and output which is well labeled. At this point in the semester, you should be submitting code that includes good form and documentation throughout. Reductions for not following the class standards be a minimum of 20% of the grade. An example of my output from this program is below -- however, the output will continue until Celsius reaches 20. The alignment is up to you, but it should be consistent. Meaning either left, center or right align both values. 11. Celsius to Fahrenheit Table Write a program that displays a table of the Celsius temperatures 0 through 20 and their Fahrenheit equivalents. The formula for converting a temperature from Celsius to Fahrenheit is F= 9 5 C+ 32 where F is the Fahrenheit temperature and C is the Celsius temperature. Your program must use a loop to display the table Here is My Code import java.util.Scanner; public class CelsiusIntoFahrenheit1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double celsius; double fahrenheit; System.out.print("Enter temperature in Celsius: "); celsius = sc.nextDouble(); fahrenheit = 32 + (celsius * 9 / 5); for (int celsius = -5; celsius <= 5; celsius++) { fahrenheit = 32 + (celsius * 9 / 5); System.out.println(celsius + " ºC => " + fahrenheit + " ºF"); } } } Error Message ----jGRASP exec: javac -g CelsiusIntoFahrenheit1.java CelsiusIntoFahrenheit1.java:18: error: variable celsius is already defined in method main(String[]) for (int celsius = -5; celsius <= 5; celsius++) { ^ 1 error ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete.
Write a program that displays a table of the Celsius temperatures 0 through 20 and
their Fahrenheit equivalents. The formula for converting a temperature from Celsius to
Fahrenheit is
F=
9
5
C+ 32
where F is the Fahrenheit temperature and C is the Celsius temperature. Your program must
use a loop to display the table
import java.util.Scanner;
public class CelsiusIntoFahrenheit1 {
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
double celsius;
double fahrenheit;
System.out.print("Enter temperature in Celsius: ");
celsius = sc.nextDouble();
fahrenheit = 32 + (celsius * 9 / 5);
for (int celsius = -5; celsius <= 5; celsius++) {
fahrenheit = 32 + (celsius * 9 / 5);
System.out.println(celsius + " ºC => " + fahrenheit + " ºF");
}
}
}
----jGRASP exec: javac -g CelsiusIntoFahrenheit1.java
CelsiusIntoFahrenheit1.java:18: error: variable celsius is already defined in method main(String[])
for (int celsius = -5; celsius <= 5; celsius++) {
^
1 error
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images