Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pplease post script in Matlab Depending on the numerator and denominator of a proper fraction, if you convert it to a decimal number you might

image text in transcribedPplease post script in Matlab

Depending on the numerator and denominator of a proper fraction, if you convert it to a decimal number you might end up having repeating decimals. For example: 5= 0.3333 ...= 0.3 or 1423 = 0.14373737... = 0.1437 9900 Note that in the second fraction 14 and 37 are the non-repeating and repeating decimals respectively. Now, consider a general case in which none of the repeating or non-repeating decimals is zero. Let's assume that A is an m digit number representing the non-repeating decimals and B is an n digit number representing the repeating decimals. For example for 0.1437, A, m, B, and n are 14, 2, 37, and 2 respectively. Given A, m, B, and n , write program to find the numerator and denominator of a proper fraction representing the following numbers: 0.587, 0.56743 This problem has 5 points (2 points for algebra, 1 point for choice of variable and com- menting your code, 2 points for correct output). Depending on the numerator and denominator of a proper fraction, if you convert it to a decimal number you might end up having repeating decimals. For example: 5= 0.3333 ...= 0.3 or 1423 = 0.14373737... = 0.1437 9900 Note that in the second fraction 14 and 37 are the non-repeating and repeating decimals respectively. Now, consider a general case in which none of the repeating or non-repeating decimals is zero. Let's assume that A is an m digit number representing the non-repeating decimals and B is an n digit number representing the repeating decimals. For example for 0.1437, A, m, B, and n are 14, 2, 37, and 2 respectively. Given A, m, B, and n , write program to find the numerator and denominator of a proper fraction representing the following numbers: 0.587, 0.56743 This problem has 5 points (2 points for algebra, 1 point for choice of variable and com- menting your code, 2 points for correct output)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 22nd International Conference Dexa 2011 Toulouse France August/September 2011 Proceedings Part 1 Lncs 6860

Authors: Abdelkader Hameurlain ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2011th Edition

3642230873, 978-3642230875

More Books

Students also viewed these Databases questions

Question

How would you draw a cluster sample for the CityBus project?

Answered: 1 week ago

Question

Describe obsessive-compulsive disorder.

Answered: 1 week ago