119k views
2 votes
Subana is writing a program which will calculate the mean average of a set of numbers by adding the numbers and dividing the result by the amount of numbers. She will use a variable, avg, to store this average. Which variable type would be most suitable for avg?

a.String
b.Floating Point (Float)
c.Boolean
d.Integer (Int)

User Alokrajiv
by
5.4k points

1 Answer

5 votes

Answer:

b.Floating Point (Float)

Step-by-step explanation:

In Computer science, Floating Point (Float) contains floating decimal points which are denoted with 32 bits (single precision) or 64 bits (double precision).

Examples of floats are 1.7, 0.005, -2.23

Since Subana is writing a program which will calculate the mean average of a set of numbers by adding the numbers and dividing the result by the amount of numbers

The Floating Point (Float) variable type would be the most suitable for avg.

User Ahmed Khedr
by
5.9k points