Question: Q 4 ( 2 5 pts ) . Write acomplete C + + program that performs the following: Your program should contain a find average
Q pts Write acomplete program that performs the following:
Your program should contain a find average function and a main function.
Assume that all stack behaviors are already present in a file called stack.h and hence you can #include "stack. h The function void findavgstruct stack s struct stack s which takes two stacks as its arguments and pushes elements of stack s which are smaller than the average of all elements, into stack s Pay attention that the elements in stack s should be preserved.
In your main function:
Create two stacks s with size
Fill the stack s by accepting user inputs.
Call your function findavg and fill s
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
