// Average of a float
float avg(float numbers[]) {
int arraylength = sizeof(arr)/sizeof(arr[0]);
float sum = 0;
for (int i = 0; i < arraylength; i++) {
sum += numbers[i];
}
return sum / arraylength;
}
int a, b, c, d, sum, average;
cout << "Input the 1st number: ";
cin >> a;
cout << "Input the 2nd number: ";
cin >> b;
cout << "Input the 3rd number: ";
cin >> c;
cout << "Input the 4th number: ";
cin >> d;
sum = a+b+c+d;
average = sum/4;
cout << "The average is: " << average << endl;