Westonci.ca connects you with experts who provide insightful answers to your questions. Join us today and start learning! Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

(problem is given by the image)

Problem Is Given By The Image class=

Sagot :

The program that prompts the user for three integers and displays their average as a floating point is given below:

The Code:

import java.util.Scanner;

public class ArithmeticSmallestLargest {

   public static void main(String[] args) {

       Scanner input = new Scanner(System.in);

       int num1;

       int num2;

       int num3;

       int sum;

       int average;

       int product;

       int largest;

       int smallest;

       System.out.print("Enter First Integer: ");

       num1 = input.nextInt();

       System.out.print("Enter Second Integer: ");

       num2 = input.nextInt();

       System.out.print("Enter Third Integer: ");

       num3 = input.nextInt();

       sum = num1 + num2 + num3;

       average = sum / 3;

       product = num1 * num2 * num3;

       largest = num1;

       smallest = num1;

       if(num2 > largest)

           largest = num2;

       if(num3 > largest)

           largest = num3;

       if(num2 < smallest)

           smallest = num2;

       if (num3 < smallest)

           smallest = num3;

       System.out.println("The sum is " + sum);

       System.out.println("The average is " + average);

       System.out.println("The product is " + product);

       System.out.println("Largest of three integers is " + largest + " and the smallest is "+ smallest + ".");

   }

}

Read more about java programming here:

https://brainly.com/question/18554491

#SPJ1

Thanks for using our service. We're always here to provide accurate and up-to-date answers to all your queries. Thanks for stopping by. We strive to provide the best answers for all your questions. See you again soon. We're glad you chose Westonci.ca. Revisit us for updated answers from our knowledgeable team.