d) Given a code to find the average and power of some values. Fill in the blanks based on the comments given in bold to
Posted: Wed Apr 27, 2022 3:08 pm
Urgent help please I only have 1 hours to complete this
d) Given a code to find the average and power of some values. Fill in the blanks based on the comments given in bold to complete the code. (7 marks) #include <iostream> // (a) Library function (1mark) using namespace std; // (b) Function prototype (1mark) // (c) Function prototype (1mark) int main() { int a, b, c, purata, powerof; cout << "Please enter three numbers:" << endl; cin >> a >> b >> C; // (d) write function call purata (1mark) cout << "The average of the given three numbers is: " << purata « endl; /* (e) write function call powerof (1mark)*/ cout << "The average number to the power of two is: " << powerof << endl; return 0; } int average (int x, int y, int z) { int sum, purata2; sum = x + y + z; purata2= sum / 3; // (f) return a value (1mark) } int power (int p) { int pwr; pwr = pow (p, 2); // (g) return a value (1mark)
d) Given a code to find the average and power of some values. Fill in the blanks based on the comments given in bold to complete the code. (7 marks) #include <iostream> // (a) Library function (1mark) using namespace std; // (b) Function prototype (1mark) // (c) Function prototype (1mark) int main() { int a, b, c, purata, powerof; cout << "Please enter three numbers:" << endl; cin >> a >> b >> C; // (d) write function call purata (1mark) cout << "The average of the given three numbers is: " << purata « endl; /* (e) write function call powerof (1mark)*/ cout << "The average number to the power of two is: " << powerof << endl; return 0; } int average (int x, int y, int z) { int sum, purata2; sum = x + y + z; purata2= sum / 3; // (f) return a value (1mark) } int power (int p) { int pwr; pwr = pow (p, 2); // (g) return a value (1mark)