Written in C Please   Create a calculator program as follows. Create a menu function named kitten ( function should display the menu options and return the user selection with the following options. Prototype int kitten(void); ) : 1 to calculate the number of real solutions for a quadratic equation Prototype: void fluffy(float a, float b, float c); 2 to calculate the resistance in series for two or more resistors (no limit on number of resistors) Prototype: float series(float a, float b); 3 to calculate the resistance in parallel for two or more resistors (no limit on number of resistors) Prototype: float parallel(float a, float b); 4 to calculate the total of raising a value to an integer power value. Prototype float frisky(float x, int y); 5 to exit program Repeatedly display the menu after each calculation until option 5 is entered. YOU HAVE TO CREATE AND USE ALL FIVE FUNCTIONS. Option 1: Ask the user for and store the three numerical coefficients of a quadratic equation and store them in three float variable. Write a function named fluffy which takes the three coefficients as float arguments and has no return. Call the function fluffy and pass the user inputs as arguments. The function will output a statement indicating the number of solutions. For a quadratic equation in the form ax2 + bx + c = 0, calculate the value of b2 − 4ac and if it is: Negative zero solutions Zero one solution                 Positive two solutions Option 2: Ask the user for the resistor value one resistor at a time. Write and use a function called series that takes two resistors in series and return the total resistance. Rseries = R1 + R2 + R3 + ..... Keep adding the resistor values by calling “res-series” until the user enters zero or negative value, then display the total resistance the screen. (use a do-while and every time you need to add a resistor pass it to the function with the previous value returned by the function) Option 3: Ask the user for the resistor value one resistor at a time. Write and use a function called parallel that takes two resistors in parallel and return the total resistance. 1 / Rparallel = 1 / R1 + 1 / R2 + 1 / R3 + ..... Keep adding the resistor values by calling parallel until the user enters zero or negative value, then display the total resistance to the screen. (use a do-while and every time you need to add a resistor pass it to the function with the previous value returned by the function) Option 4: Do not use math.h function. Do not use pow function, write your own. Ask the user for and store the base number as a float. Ask the user for and store the power as integer. Create and call a function named frisky that takes the base and the power as arguments and returns the result. Output the returned result to the screen. Note: the power can be either positive, zero, or negative integers. Option 5: exit the program.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
Written in C Please
 
Create a calculator program as follows.
Create a menu function named kitten ( function should display the menu options and return the user
selection with the following options. Prototype int kitten(void); ) :
1 to calculate the number of real solutions for a quadratic equation
Prototype: void fluffy(float a, float b, float c);
2 to calculate the resistance in series for two or more resistors (no limit on number of resistors)
Prototype: float series(float a, float b);
3 to calculate the resistance in parallel for two or more resistors (no limit on number of resistors)
Prototype: float parallel(float a, float b);
4 to calculate the total of raising a value to an integer power value.
Prototype float frisky(float x, int y);
5 to exit program
Repeatedly display the menu after each calculation until option 5 is entered.
YOU HAVE TO CREATE AND USE ALL FIVE FUNCTIONS.
Option 1:
Ask the user for and store the three numerical coefficients of a quadratic equation and store them in
three float variable.
Write a function named fluffy which takes the three coefficients as float arguments and has no return.
Call the function fluffy and pass the user inputs as arguments. The function will output a statement
indicating the number of solutions.
For a quadratic equation in the form ax2 + bx + c = 0, calculate the value of b2 − 4ac and if it is:
Negative zero solutions
Zero one solution
 
 
 
 
 
 
 
 
Positive two solutions
Option 2:
Ask the user for the resistor value one resistor at a time.
Write and use a function called series that takes two resistors in series and return the total resistance.
Rseries = R1 + R2 + R3 + .....
Keep adding the resistor values by calling “res-series” until the user enters zero or negative value, then
display the total resistance the screen. (use a do-while and every time you need to add a resistor pass it
to the function with the previous value returned by the function)
Option 3:
Ask the user for the resistor value one resistor at a time.
Write and use a function called parallel that takes two resistors in parallel and return the total
resistance. 1 / Rparallel = 1 / R1 + 1 / R2 + 1 / R3 + .....
Keep adding the resistor values by calling parallel until the user enters zero or negative value, then
display the total resistance to the screen. (use a do-while and every time you need to add a resistor pass
it to the function with the previous value returned by the function)
Option 4:
Do not use math.h function. Do not use pow function, write your own.
Ask the user for and store the base number as a float. Ask the user for and store the power as integer.
Create and call a function named frisky that takes the base and the power as arguments and returns the
result. Output the returned result to the screen.
Note: the power can be either positive, zero, or negative integers.
Option 5: exit the program.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning