Skip to content

Commit

Permalink
Replace Pointer in Example of the day
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianZug committed Dec 3, 2024
1 parent f089b24 commit 5c45a72
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 04_Funktionen.md
Original file line number Diff line number Diff line change
Expand Up @@ -840,24 +840,24 @@ int main(int argc, char *argv[]) {

using namespace std;

double Mittelwert(int *values, int entries);
double Mittelwert(int values[], int entries);
int Summe(int *values, int entries);
void Ausgabe(int *values, int entries);

double Mittelwert(int *values, int entries){
double Mittelwert(int values[], int entries){
double summe = Summe(values, entries);
return summe / entries;
}

int Summe(int *values, int entries){
int Summe(int values[], int entries){
int summe = 0;
for (int i=0; i<entries; i++){
summe += values[i];
}
return summe;
}

void Ausgabe(int *values, int entries){
void Ausgabe(int values[], int entries){
for (int i=0; i<entries; i++){
std::cout << std::setw(2) << i << " ";
}
Expand Down

0 comments on commit 5c45a72

Please sign in to comment.