Untitled

 avatar
unknown
c_cpp
4 years ago
465 B
4
Indexable
// Example program
#include <iostream>
#include <string>

using namespace std; 

float input(float variable) {

cin >> variable;
cout << endl;

return variable;

}

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

return ((a + b + c + d) / 4.0);

}

int main() {

float a,b,c,d;

cout << "a=";

a = input(a);

cout << "b=";

b = input(b);

cout << "c=";

c = input(c);

cout << "d=";

d = input(d);

cout << "Result: ";

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

return 0;

}
Editor is loading...