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 16:10
When copying and pasting text, the first step is move your cursor type the text select the copy command select the paste command
Answers: 2
question
Computers and Technology, 22.06.2019 21:10
Dameas communication challenge is due to which factor
Answers: 2
question
Computers and Technology, 23.06.2019 03:50
Q-1 which of the following can exist as cloud-based it resources? a. physical serverb. virtual serverc. software programd. network device
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
You know the right answer?
Suppose that you have the following declaration: stack Type stack(50); double num; and the input is...
Questions
question
Arts, 13.04.2021 05:50
question
English, 13.04.2021 05:50
question
Mathematics, 13.04.2021 05:50
question
Mathematics, 13.04.2021 05:50
question
Mathematics, 13.04.2021 05:50
question
Mathematics, 13.04.2021 05:50
Questions on the website: 13722367