C++ for Engineers and Scientists
C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
Question
Book Icon
Chapter 6, Problem 2PP
Program Plan Intro

Program plan:

  • Include the header file and use the namespace std for standard I/O.
  • Define the function fractionToDecimal(double numerator, double denominator). The function will return the decimal part that is the resultant of division.
  • Define the main function.
  • Declare the variables num and den.
  • Prompt the user to enter the numerator and denominator.
  • Read the numerator and denominator in variable num and den.
  • Call function fractionToDecimal using num and den as paramters.

Program description:

The main purpose of the program is to implement the below function into the driver function.

  doublefractionToDecimal(doublenumerator,doubledenominator){return(numerator/denominator);}

Blurred answer
Students have asked these similar questions
What are the steps you will follow in order to check the database and fix any problems with it and normalize it?  Give two references with your answer.
What are the steps you will follow in order to check the database and fix any problems with it? Have in mind that you SHOULD normalize it as well. Consider that the database offline is not allowed since people are connected to it and personal data might be bridged and not secured. Provide three refernces with you answer.
Should software manufacturers should be tolerant of the practice of software piracy in third-world countries to allow these countries an opportunity to move more quickly into the information age? Why or why not?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,