1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
NemiM [27]
3 years ago
10

Java Eclipse homework. I need help coding this|

Computers and Technology
1 answer:
mezya [45]3 years ago
5 0

import java.util.Scanner;

import java.util.Arrays;

public class MyFamily {

   public static void main(String[] args) {

       float avg = 0;

       int smallest = 0;

       int largest = 0;

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter the name of a friend or family member.");

       String name1 = scan.nextLine();

       System.out.println("Enter "+name1+"'s age");

       int name1Age = scan.nextInt();

       System.out.println("Enter the name of a friend or family member.");

       String name2 = scan.next();

       System.out.println("Enter "+name2+"'s age");

       int name2Age = scan.nextInt();

       System.out.println("Enter the name of a friend or family member.");

       String name3 = scan.next();

       System.out.println("Enter "+name3+"'s age");

       int name3Age = scan.nextInt();

       int[] ages = {name1Age, name2Age, name3Age};

       Arrays.sort(ages);

       System.out.println("The oldest is " + ages[2] + " years old");

       System.out.println("The youngest is " + ages[0] + " years old");

       System.out.println("The average is (("+name1Age + "+" + name2Age + "+" + name3Age+") / 3) = " + ((name1Age + name2Age + name3Age) / 3) + " years old");

       System.out.println(name1+", "+name1Age + " years old");

       System.out.println(name2+", "+name2Age + " years old");

       System.out.println(name3+", "+name3Age + " years old");

       

   }

   

}

I hope this helps!

You might be interested in
Monica is writing a paper, and it needs to contain a certain amount of words. What Word Online feature can she use?IndentingProo
Greeley [361]

Answer:

Its word count so she knows how much words she is writing

Explanation:

7 0
2 years ago
If someone wouldn’t mind answering the first question for me
kompoz [17]

1.

  • Keep the title bold
  • <u>Underline</u> important statements
  • Colour the words (but the document shouldn't be too colourful)
8 0
3 years ago
Identifiy the impact of new technology for your organizations <br>​
Len [333]

Answer:

1)The Sleepwalker Effect. This effect has several dimensions. ...

2)The Transparency Effect. ...

3)The Black Box Effect. ...

4)The Splintering Effect.

7 0
2 years ago
2 examples of free, proprietary and online software for multimedia presentations (two of each) ._.
photoshop1234 [79]

Answer:

1. PowerPoint online

2. Goógle Slides

Explanation:

There is a various free, proprietary, and online software for multimedia presentations available for use. Some of which include:

1. PowerPoint online: this is an online and free version of Microsoft Office PowerPoint software. Some of its features include text formatting, use of animations, cloud storage among others.

2. Goógle Slides: This is a product of Goógle to make the multimedia presentation of documents available online. It also offers many feature including cloud storage.

4 0
2 years ago
a ____ is a feature that finds a list potential design problems associated with your document brainly.com
andrezito [222]
1. eliminating some diseases
2. improving certain species (like growing bigger apples)

8 0
2 years ago
Other questions:
  • ________ are the most popular method used by visitors to find web sites.
    6·1 answer
  • Help PLEASE (in attachment)
    8·1 answer
  • After spending a year in India, Giovanna returns home to the United States and is inspired to raise money to help her new friend
    14·1 answer
  • Guess The Song: <br> What Popping Brand New Whip Just Hopped In, I Got options
    15·1 answer
  • Provide a status report to your classmates and instructor. Describe any modifications that you have made to the design or docume
    10·1 answer
  • According to the video, what are some concerns of Webmasters? Check all that apply.
    7·2 answers
  • Where can formatting features be found ?! Need help asp !‍♀️
    9·1 answer
  • One of the benefits of holding an investment for over a year rather than selling it in less than a year is that the
    14·2 answers
  • A company is looking for an employee to assign passwords to all of its
    5·1 answer
  • Consider the following variable declarations and initializations.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!