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

What is a gene? A. a section of a protein that codes for DNA B. the alternate version of a trait C. the visible trait in the F1 generation D. a section of D
What is the coefficient in this expression? 17 + 5a
What impact did Ponce de leon have on the world?
what happens when the smog lifts in los angeles,california
Which of the following countries has the most islands? a. Indonesia b. Philippines c. Timor-Leste d.Singapore
Analyze how friction can be both a positive and negative aspect In our every day lives
why would genetic material need to be able to reproduce
Which of the following required all states to return fugitive slaves to their owners? a) the great compromise b) the Connecticut compromise c) the three-fift
Help! Donovan runs about 2.5 miles each day. In 3 weeks, about how many miles does he run?
where does one ocean stop and another start?