foxethan188 foxethan188
  • 14-02-2018
  • Computers and Technology
contestada

In java - compute the average kids per family. note that the integers should be type cast to doubles.

Respuesta :

pbzepplin
pbzepplin pbzepplin
  • 23-02-2018

The formula for calculating the average is simple: total number of kids/total number of families.

Note, while the kids and families will be integers, the average will likely be a double. Therefore, in Java, you need to type cast the result:

Average_kids_per_family =(double) total_number_of_kids/total_number_of_families

Answer Link

Otras preguntas

find 5 consecutive odd integers if the sum of the first 3 integers more than the sum of the last 2
In the lesson, you explored the process of critically reading primary documents to learn about U.S. history. Think about the exercises in the lesson where you w
Find the x value that makes the lines parallel. 2x° 80°
The entire graph of the function f is shown in the figure below. Write the domain and range of f using interval notation.
what is the obligation of the state to guarantee human rights?
Can you help with these vocabulary word
A human cell containing 22 non-sex chromosomes and a Y chromosome is O a male non-sex cell O a fertilized egg O a sperm O an egg
Расставьте коофициенты: 1. Al2O3 + HCL = AlCl3 + H2O 2. FeO + H2So4 = FeSo4 + H2O 3. Fe2O3 + H2 = Fe + H2O 4. Na2S + AgNo3 = Ag2S + NaNo3
The meeting will begin after the boss_____
The student academic group on a college campus claims that freshman students study at least 2.5 hours per day, on average. One Introduction to Statistics class