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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:30, caldonjoshhsms2061
What are the steps involved in accepting all the changes in a document? arrange these in order click edit. click accept or reject. click changes. click accept all.
Answers: 1
image
Computers and Technology, 22.06.2019 15:30, tfornwalt4390
Melissa needs to add a topic to an email that she will send to her teacher. choose the name of the field where she should type her topic.
Answers: 2
image
Computers and Technology, 23.06.2019 00:10, makailaaa2
My has been slow anyone else’s ?
Answers: 1
image
Computers and Technology, 23.06.2019 01:30, bri2728
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most? a)give the file a unique name b)name the file in yymmdd format c)use descriptive name while naming the files d)use capital letters while naming the file
Answers: 3
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 in other subjects:

Konu
Mathematics, 06.05.2021 01:00
Konu
Mathematics, 06.05.2021 01:00
Konu
Mathematics, 06.05.2021 01:00
Konu
Biology, 06.05.2021 01:00
Konu
Biology, 06.05.2021 01:00