subject

3. Write a program to ask the user to enter a number and display its square root. If the user enters a negative number, your program should ask the user to re-enter the number again repeatedly until the user finally enters a zero or a positive number. Then your program shall display its square root. You may assume that the user only enters a number, not letters or symbols. Therefore there is no input failure. (30%) Hint: (1) Use a while loop or a do-while loop for the repetition.
(3) The square root function sqrt() is defined in cmath.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
What engine component is shown in the above figure?
Answers: 1
question
Computers and Technology, 24.06.2019 03:40
4. does the kernel phenotype distribution support the idea that the cob is the result of a dihybrid cross? what information supports your answer? if a dihybrid cross (i.e. f1 to f2 of standard mendelian crosses) is not indicated what conditions might contribute to this finding.
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
Each row in a database is a set of unique information called a(n) ? a.) table. b.) record. c.) object. d.) field.
Answers: 2
You know the right answer?
3. Write a program to ask the user to enter a number and display its square root. If the user enters...
Questions
question
Business, 13.10.2020 17:01
question
Mathematics, 13.10.2020 17:01
question
Mathematics, 13.10.2020 17:01
question
History, 13.10.2020 17:01
question
Mathematics, 13.10.2020 17:01
Questions on the website: 13722363