Suppose that you have the following declaration:stackType stack(50);double num;and the input is25 64 -3 6.25 36 -4.5 86 14 -12 9Write a C++ code that processes this input as follows: If the number is nonnegative, it pushes the square root of the number onto the stack; otherwise it pushes the square of the number onto the stack. After processing these numbers write a C++ code that outputs the elements of the stack.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here