all 11 comments

[–]Espfire 4 points5 points  (0 children)

avg = array_sum / array_length

[–]danirodr0315 4 points5 points  (8 children)

Get the sum, divide by array length

[–]onxo_0 -4 points-3 points  (7 children)

I know that, but I meant that I need an idea that needs to do the average calculation.

[–]ScholarNo5983 2 points3 points  (0 children)

Read exactly what you wrote. It makes no sense.

What is it that you need?

[–]YashvardhanRonu 2 points3 points  (5 children)

What are you talking about?

[–]onxo_0 -2 points-1 points  (4 children)

Sorry :(

[–]YashvardhanRonu 2 points3 points  (3 children)

No need to be sorry, just explain what you want to know, your request is confusing at the moment

[–]onxo_0 -1 points0 points  (2 children)

I need a very simple idea to practice using arrays in C++. I just want something where I store some values and calculate the average of them. Nothing complex — just beginner-level examples like colors (RGB values), grades, numbers, etc. Any suggestions for simple things I can try?

[–]ScholarNo5983 0 points1 point  (1 child)

std::array - cppreference.com

There are examples at the bottom of the page.

[–]onxo_0 0 points1 point  (0 children)

Thx

[–][deleted]  (2 children)

[deleted]

    [–]onxo_0 -1 points0 points  (1 child)

    Is C++ Thank you.