C++ help

Home Forums C Programming C++ help

This topic contains 0 replies, has 1 voice, and was last updated by  saranyabalaji 10 years, 11 months ago.

  • Author
    Posts
  • #2017

    Modify this lab by implementing functions to perform most of the tasks in the main body.
    Your new program must utilize at least the following functions:
    1.  A function, called getDouble() that returns a double after reacting to any possible input failure.
    2.  A function, called getInt() that returns an int after reacting to any possible input failure.
    3.  A function that accepts three doubles (for the three quadratic coefficients) and returns:           
    –  If the coefficients match the criteria under Lab 4.           
      –  If the coefficients result in a non-quadratic equation.           
      –  If the coefficients result in an equation with non-real roots
    4.  Two functions that each accept the three quadratic coefficients and each return their respective roots of the equation.
    5.  A function that prints your menu.
    6.  A function, called processUserChoice. that accepts the user choice (calculate, enter coeffs, or quit) and the a, b, and c and processes the user choice. Your functions must “more-or-less” work with the following main program:

    Note that doubles a,b, and c must be passed into ProcessUserChoice by reference so that that function may make changes to a, b, and c. Make sure you properly document your functions.  Lastly, all of your functions must be included in a separate stand-alone library.
    Can you aid me on where to start?
    Thanks so much!

You must be logged in to reply to this topic.