I am really struggling to understand how to write this while loop based on the instructions. Can someone please show me what to do? I already tried to write my own code below and it's bad.
Here are the instructions:
Write a sentinel controlled while loop that will allow you to calculate the average low temperature for any month. The average temperature should be displayed as a properly calculated double value. Explain why you chose the sentinel value. The code for the input of the initial temperature value is provided.
Here is my code:
Scanner scan = new Scanner(System.in);
int temp = scan.nextInt();
while ()
{
temp = 5.0/9.0 * (temp - 32.0);
System.out.println()
}