Ask your own question, for FREE!
Computer Science 12 Online
Gucchi:

Read the following code: # Calculate average average = num1 + num2 + num3 / 3.0 There is an error in the code. How should the code be revised in order to get the correct output? average = num1 + num2 + num3 - 3.0 average = num1 + num2 + num3 * 3.0 average = (num1 + num2 + num3) / 3.0 average = num1 + num2 + num3 / (3.0)

Gucchi:

@smokeybrown

Gucchi:

am i right with C?

SmokeyBrown:

Yup, you got it. You would want to put the additive variables in parentheses so they are all added together, and then divided by 3. That is how you would calculate the average. Well done :)

Gucchi:

thank you

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!