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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education