(20 points) write a complete Java program that: (a) Prompts its user to enter ex
ID: 660580 • Letter: #
Question
(20 points) write a complete Java program that: (a) Prompts its user to enter exactly s integer input and assigns each to its own element of values (b) Com the average of only the values in the array are in the range (1, 101 important inputs" that (c) Displays a brief report including only/all of the "important inputs" and their average Please enter an Integer 1 Please enter an Integer Please enter an Integer 65 Please enter an Integer 101 Please enter an Integer 5 Please enter an Integer -1 1 was an important input 3 was an important input 5 was an important input The average of the important inputs is 4.5Explanation / Answer
{
if (number[i]>=1 && number[i]<=10)
{
System.out.print("%d is the important input",number[i]);
System.out.print(" ");
sum=sum+number[i];
}
}
avg=sum/5;
System.out.println("Average of the important inputs is %d",avg);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.