Hi there, ive been comin here for about a month glancing at forum posts and the practice thread.. I have been self teaching myself C++ for a few months, and it was pretty challenging at first, my biggest problem is memorization.. so anyways... i was wondering if anyone could help me with this question from "Beginning C++ Through Game Programming"

"write a program that gets three game scores from the user and displays the average."

I understand what its asking me to do, i can prompt the user to give me numbers for each of my 3 variables........ but i dont know how to... uh get the average..:confused:

Recommended Answers

All 3 Replies

add the scores together and divide by three.

Or if you have n values to average add em together and divide by n.

You haven't been through 4th Grade math yet? Do you honestly not know how to figure the average of, say, 26,30,37?

Hint - 31.

Yeah I know right, felt like an idiot -.-, i got it now though thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.