Home Forums C Programming C++ help

Viewing 0 reply threads
  • Author
    Posts
    • #2017
      saranyabalaji
      Participant

      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!

Viewing 0 reply threads
  • The forum ‘C Programming’ is closed to new topics and replies.