subject

Write a program to convert a fraction to a decimal. Have your program ask for the numerator first, then the denominator. Make sure to check if the denominator is zero. If it is, print out "Error - cannot divide by zero." Hint: Since this lesson uses if-else statements, remember to use at least one if-else statement in each of your answers to receive full credit.

Sample Run 1
Numerator: 10
Denominator: 0
Sample Output 1
Error - cannot divide by zero.
Sample Run 2
Numerator: 12
Denominator: 15
Sample Output 2
Decimal: 0.8

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Annie is creating a corporate report for a company’s annual meeting. in the report, she wants to add the signature of various department heads. which device can annie use to capture signatures to include in the report? a. printer b. monitor c. e-reader d. digitizing tablet
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
List the five on-board vehicle subsystems
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
You know the right answer?
Write a program to convert a fraction to a decimal. Have your program ask for the numerator first, t...
Questions
question
History, 02.11.2019 03:31
question
English, 02.11.2019 03:31
question
Mathematics, 02.11.2019 03:31
Questions on the website: 13722362