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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

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

Post by answerhappygod »

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 1
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 1 (88.48 KiB) Viewed 25 times
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)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply