Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

what are projective techniques and how can they be used profitably

Answered: 1 week ago