An outdoor temperature monitoring application is given below:
package pack10;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter daily high temperature readings (in Fahrenheit) ");
int input;
int numDays=0;
int highTemp=-999;
int lowTemp=999;
double average=0;
while(true) {
System.out.print("Enter temperature : ");
input = sc.nextInt();
if(input==555) {
break;
}
if(input<-20 || input>120) {
System.out.println("Error!!! Please enter temperatur in range -20 to 120 exclusive");
}else {
numDays++;
if(input>highTemp) {
highTemp = input;
}
if(input<lowTemp) {
lowTemp = input;
}
average += input;
}
}
System.out.println("Number of days the temperature entered : "+numDays);
System.out.println("The minimum temperature is : "+lowTemp);
System.out.println("The maximum temperature is : "+highTemp);
average/=numDays;
System.out.println("The average of the temperature is : "+average);
}
}
<h3>What is a program?</h3>
A computer program is a set of instructions written in a programming language that a computer can execute. Software includes computer programs as well as documentation and other intangible components. Source code refers to a computer program in its human-readable form.
The outdoor temperature monitoring application that allows a user to keep entering daily high temperature readings is illustrated above.
Read more about programming here:
brainly.com/question/23275071
#SPJ1`