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
How would you create a tint of a color?
svetlana [45]
D. white with a hue
HOPE THIS HELPS
5 0
3 years ago
A large corporation uses:<br>LAN<br>WAN<br>Wireless network<br>Ethernet connection​
Katen [24]

Answer:

Probably would use LAN

Explanation:

Schools use LAN to connect students to their networks, so it would make sense for them to use LAN for offices. They could use ethernet if all their PCs are hard wired in, though.

3 0
4 years ago
Read 2 more answers
Anyone here codes? <br> C++, C#, Lua? Anything?
Travka [436]

Answer:

IxxyzjgzkgzjgKfzkg v

jvljcljxkhxkgg/gjhkggzkykzkgjzjgggggzjgcufxu

Explanation:

nk yxthzefhGghghrhgzxhhsdgchiixxu

7 0
3 years ago
Read 2 more answers
What is the role of a design tWhat is the role of a design tool in a Robotic Process Automation (RPA) solution?
marin [14]

Answer and Explanation:

Robotic Process Automation(RPA) are software tools that apply artificial intelligence(AI) technology to automate digital routine tasks for business executives. It mimics everyday tasks and automatically executes them for the user.

Design tools in RPA play the role of infusing the best design into RPA software, it works with the popular phrase "design thinking". Robotic process automation software are now in tune with the popular buzz of a user centered approach to design of RPA tools. This ideology focuses on deploying RPA software that appeals to users and are therefore market friendly.

4 0
3 years ago
Write an expression that executes the loop body as long as the user enters a non-negative number.
Grace [21]

Answer:

user_num = 9

while user_num > -1:

 print("Body")

 user_num = int(input())

print("Done")

If this answer helped consider rating and marking brainliest :)

7 0
2 years ago
Read 2 more answers
Other questions:
  • Mobile providers can be susceptible to poor coverage indoors as a result of: a high degree of latency. network congestion that c
    8·1 answer
  • ____ refers to the ability of one computing device (a desktop computer, portable computer, or smartphone, for example) on a netw
    12·1 answer
  • To close the header or footer, you should press the ________ key(s) on your keyboard.
    8·1 answer
  • Provide the definition for each of the following structures and unions:
    8·1 answer
  • What is logical memory?
    15·1 answer
  • When you see a/an _______ pointer, this means you can drag the row or column border to change height or width.
    12·2 answers
  • What are the ten application areas of computer?​
    10·1 answer
  • 2. It enables you to gather data on a specific topic. *a.Interviewb.Questionnairec.Surveyd.Research
    14·1 answer
  • What is office course<br> how to learn office course
    12·1 answer
  • What is edge computing?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!