subject

Suppose that you have the following declaration: stack Type stack(50); double num; and the input is
25 64-3 6.25 36-4.5 86 14 -129
Write a C++ code that processes this input as follows: If the number is non-negative, 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.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:10
Which activity should be part of a long-term plan to positively affect yourhealth? oa. wearing regular clothing when handling toxinsob. not worrying about secondhand smokeoc. avoiding excessive exposure to sunlightod. drinking only well water
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
question
Computers and Technology, 24.06.2019 08:10
Where are american poets found in the dewey decimal system
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
The program below has been generalized to read a user's input value for hourlywage. run the program. notice the user's input value of 10 is used. modify that input value, and run again. generalize the program to get user input values for workhoursperweek and workweeksperyear (change those variables' initializations to 0). run the program. monthsperyear will never change, so define that variable as final. use the standard for naming final variables. ex: final int max_length
Answers: 2
You know the right answer?
Suppose that you have the following declaration: stack Type stack(50); double num; and the input is...
Questions
question
Health, 27.08.2019 09:20
question
Business, 27.08.2019 09:20
question
Chemistry, 27.08.2019 09:20
Questions on the website: 13722362