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 03:30
Which group on the home tab allows you to add shapes to a powerpoint slide?
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Which type of file can be used to import data into a spreadsheet?
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
This graph compares the total cost of attending educational institutions in texas. the graph demonstrates that the cost at private and public technical schools greatly varies.
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
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
Questions on the website: 13722363