Answer:
Argument
Explanation:
<u>Argument</u> - A set of connected ideas, supported by examples, made by a writer to prove or disprove a point.
Answer:
My Favorite film is The Old Guard
Explanation:
I like The Old Guard because it has action an etc.
Answer:
cooperate society
Explanation:
A cooperative society is a voluntary association that started with the aim of the service of its members.
Answer:
Hence, <u>Input Validation</u> is the process of inspecting data that has been input to a program to make sure it is valid before using it in a computation.
Explanation:
The input should be validated before further processing to avoid problems in execution of program afterwards.
The process of input validation is defined to make sure that the input is valid.
Hence, <u>Input Validation</u> is the process of inspecting data that has been input to a program to make sure it is valid before using it in a computation ..
Answer:
import java.util.Arrays;
import java.util.Scanner;
public class num1 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter length of the array:");
int len = in.nextInt();
double [] temps = new double[len];
double avgTem;
int k =0;
double total = 0;
for( k=0; k<temps.length; k++){
System.out.println("Enter values for the array");
temps[k]=in.nextDouble();
}
System.out.println("The Arrays contains the following values");
System.out.println(Arrays.toString(temps));
// Computing the average of the values
for(k=0; k<temps.length; k++){
total = total+temps[k];
}
avgTem = total/(temps.length);
System.out.println("The average Temperature is: "+avgTem);
}
}
Explanation:
- Using Java programming language
- Import the Scanner class to receive user input
- Prompt User for the length of the Array, receive and store in a variable len;
- Declare a new double array of size len double [] temps = new double[len];
- Using a for loop, continually prompt user to enter values into the array
- Display the values of the array using Java's Arrays.toString method
- Use another for loop to add up all the elements in the arraay and store in the variable called total
- Outside the second for loop calculate the average avgTem = total/(temps.length);
- Display the average temp.