Question: I need help doing this program import java.util.Scanner; public class Project1_NumberCalculations { public static void main(String[] args) { Scanner input = new Scanner(System.in); int number1;

I need help doing this program

import java.util.Scanner;

public class Project1_NumberCalculations { public static void main(String[] args) { Scanner input = new Scanner(System.in);

int number1; //first number int number2; //second number int number3; //third number int largest; //largest value int smallest; //smallest value int sum; //sum of numbers int product; //product of numbers int average; //average of numbers

/* TODO#1: write a series of statements to read in three numbers and assign them to the variables number1, number2, and number3 */

largest = number1; //assume number1 is the largest smallest = number1; //assume number1 is the smallest

/* TODO#2: write code that compares all three numbers and sets the the largest and smallest accordingly */

//Performing calculations sum = number1 + number2 + number3; /* TODO#3: write statements to calculate the product and the average */

/* TODO#4: write statements to display the results */

} //end main method } //end class Project1_NumberCalculations

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!