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 22:40
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
question
Computers and Technology, 23.06.2019 04:20
4. a1. vince owns a television repair shop that is insured undera commercial package policy. the policy includes thebuilding and personal property coverage form and thecauses-of-loss broad form. the declarations page indicatesthat coverage applies to both the building and the namedinsured's business property. explain whether or not thefollowing losses would be covered under his policy.a. a fire occurs on the premises, and the building isbadly damaged.b. a burglar steals some money and securities from anunlocked safe.c. a business computer is damaged by vandals whobreak into the shop after business hours.d. a tornado touches down near the store. several tel-evision sets of customers in the shop for repair aredamaged in the storm.til
Answers: 2
question
Computers and Technology, 23.06.2019 19:00
Whose task it is to ensure that the product flows logically from one step to another?
Answers: 3
question
Computers and Technology, 23.06.2019 21:40
language consists of basic components, and they are called a. 3; mental images, concepts, and speech b. 2; language acquisition and linguistic relativity c. 3; heuristics, algorithms, and analogies d. 4; phonemes, morphemes, syntax, and semantics e. 2; words and grammar
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
question
English, 23.10.2021 14:00
question
English, 23.10.2021 14:00
Questions on the website: 13722362