Untitled

mail@pastecode.io avatar
unknown
c_cpp
4 years ago
409 B
5
Indexable
Never
float input(float variable) {

cin >> variable;

return variable;

}

float medium(float a, float b, float c, float d) {

float result = (a + b + c + d) / 4;

return result;

}

int main() {

float a,b,c,d;

cout << "a=";

cout << input(a);

cout << "b=";

cout << input(b);

cout << "c=";

cout << input(c);

cout << "d=";

cout << input(d);

cout << "Result: ";

cout << medium(a + b + c + d);

return 0;

}