heeeeeeeeeeeeeeelpe please

Howe can i desply the average of 100 values in c++ 2008

if someone wants me to post the full question I will

Just respond
please I need it quickly
this is my email(hisham_kgb@yahoo.com)
Thank u
Well, first of all...
Don't put "help" in a title.
Second of all, there is no C++ 2008; you're probably referring to Visual Studio.

Anyway, how do you find an average of something normally?

Add them all up and then divide the total by how many there are.

int values[100];


int sum = 0;
for(int i = 0; i < 100; i++) {
    sum += values[i];

int average = sum / 100;
Thank u so much.and I'm sorry but I need the answer so bad.
But I have question .Is that code will work in visual studio 2008?
Last edited on
If you want someone to do your homework for you - go to freelancer.com - people will gladly do it for a small fee. This forum is for people who want to learn C++ and is not a place where people do work instead of you for free.
Yeah, I agree. Learn if that code works or not. Don't ask me to do everything.

C++ is a language.

Visual Studio 2008 is not a language.

C++ is a language.

Therefore, if it is correct C++ syntax, it will work on any normal C++ compiler(unless it is C++11, but that is a different story).

Don't copy and paste anything. Understand what the code is doing, then code it yourself.
Topic archived. No new replies allowed.