MinAvg.java: Write a program that reads 10 integers and displays its minimum and average. Please consider the extreme case when all integers are positive. For instance, by given 1, 2, …, 10, the minimum will be 1.
import java.io.*;//imports all class from java.io package
import java.util.Scanner;//scanner class found in java.util
package
public class Main
{
public static void main(String[] args) {
int arr[]= new int[10]; //integer
array declaration
int i,a,min=0; //integer variable
declaration
float avg=0,total=0; //flaot
variable declaration
System.out.println("Enter the
numbers: ");
Scanner sc = new
Scanner(System.in);//Declaring sc as an object of scanner
class
for(i=0;i<10;i++)// loop for
user input
{
System.out.println("Enter a
positive integer:");
a=sc.nextInt();// input
if(a>0) //to consider only
positive input
{
arr[i]=a;//positive value is stored
in an array
}
else
{
i--;// else user input is taken
again and loop is decremented
System.out.println("Please enter
only positive numbers!");
}
}
min=arr[0]; //a value from the
array is stored in a variable
for(i=0;i<10;i++)//loop
{
if(arr[i]<min)//to check if it
is less than min
{
min=arr[i]; //if it is less than
min then min is changed with the new value
}
}
System.out.println("The minimum is
:"+min);//output
for(i=0;i<10;i++)//loop
{
total=total+arr[i];//to calculate
the total sum of all the array elements
}
avg=total/10;//average is
calculated
System.out.println("The average
is:"+avg);//display of average value
}
}
Screenshot of the code:

Screenshot of the
Output:


MinAvg.java: Write a program that reads 10 integers and displays its minimum and average. Please consider...
Max3.java: Write a program that reads 10 integers and displays top 3 records (i.e., the largest three elements). Please consider the extreme case when all integers are negative. For instance, by given -1, -2, …, -10, the display will be -1, -2, and -3.
Task 1 : Write a Java program that prompts for and reads 10 integers from the user into an integer array of size 10, it then: - calculates the sum and average of positive numbers of the array and displays them. [Note: consider 0 as positive] Note: The program must display the message: "There are no positive values" if the array does not contain any positive value.
Write a program that reads k integers and displays their sum. Write a program that reads k values representing family income from the keyboard and place them into the array. Find the maximum income among these values. Count the families that make less than 10 percent of the maximum income. (JAVA)
Problem 1: Write a program that reads a positive float number and displays the previous and next integers. Sample Run: Enter a float: 3.5 The previous and next integers are 3 and 4. Problem 2: Write a program that reads two integers and displays their sum, difference, product, and the result of their division. Sample Run: Enter two integers: 8 5 Sum: 8, Difference: 3, Product: 40, Division: 1.6 Problem 3: Write a program that reads a three-digit integer from...
Write a C program which reads sets of two integers and displays them and their sum. Continue readings sets of integers until their sum is zero, at which point terminate the program.
Write a program that reads integers ,one per line and displays their sum .Also display all the numbers read ,each with an annotation giving its percentage contribution to the sum. Use a method that takes the entire array as one argument and returns the sum of the numbers in the array. Hint: Ask user the user for the number of integers to be entered, create an array of that length ,and then fill the array with the integers read. A...
I need to write a C++ program that reads two integers from a data filed called "integers.dat" The first integer should be low and the other one high. The program should loop through all integers between the low and high values and include the low and high integers and then display Display the integers in the file Displays the number of integers divisible by 5 OR 6, but not both. Displays the sum of the integers from condition 2 as...
(While-loop controlled by a sentinel value) Write a program that reads an unspecified number of integers. Your program ends with the input 0. Determine and display how many positive and negative values have been read, the maximum and minimum values, and the total and average of the input values (not counting the final 0).
Write a C++ program that reads a list of numbers 10 and displays largest, second largest and third largest. Note: Please do it with loops don't used arrays
1. use c++ write a c++ program that reads 10 integers from a file named input.txt in this file the 10 integers wil be on a single line with space between the. calculate the average of these numbers and then write his number to a file named output.txt. if the program is unable to successfully complete the file operations then display eero message to the console.