Benzo
Benny   Trinec, Moravskoslezsky Kraj, Czech Republic
 
 
BARS KAMO
Currently Online
"Average Calculator using Arrays and Loops in C++"
#include <iostream>

using namespace std;

int main() {
const int SIZE = 5;
int numbers[SIZE];
double sum = 0;

// get input from user
cout << "Enter " << SIZE << " numbers:" << endl;
for (int i = 0; i < SIZE; i++) {
cin >> numbers ;
}

// calculate the sum
for (int i = 0; i < SIZE; i++) {
sum += numbers ;
}

// calculate the average
double average = sum / SIZE;

// output the average
cout << "The average of the numbers is " << average << endl;

return 0;
}
Favorite Group
Steam Music - Public Group
Listen to your music collection while you play games
248,926
Members
12,839
In-Game
54,503
Online
3,119
In Chat
Screenshot Showcase
Nostalgia
1
Favorite Game
22
Hours played
15
Achievements
Artwork Showcase
R3. Feb 12 @ 9:57am 
wall hacker confirmed on vod
LuQ Jan 5 @ 3:20pm 
rep + positive person.
Good luck, neighbor :)
tvé zdraví !
Pupkaty Jano Dec 22, 2023 @ 2:17pm 
Maly princ na Dunaji
Hor.2 中 Dec 16, 2023 @ 2:53am 
wall hack activated
top bKr Dec 15, 2023 @ 1:07pm 
dont listen to the pisswanks below this dude be playing like a madlad
ja se chci ukoncit Oct 29, 2023 @ 10:28am 
kokotek slovensky