Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write C code that does the following: 1 . Interactively read the three coefficients of a quadratic equation and compute the two roots. The program
Write C code that does the following:1. Interactively read the three coefficients of a quadratic equation and compute the two roots. The program must alert if there is no real root, i.e. read a, b, c of
|
and compute
(b b^2 4ac)/2a |
Note: sqrt is available in math.h. You need to compile the program with "-lm" option, i.e.
gcc -lm myprogram.c
Make sure that you add a routine to check the positiveness of the discriminant using the if statement. Show actual runs and examples.2. Interactively read temperature in Celsius and convert it to Fahrenheit. Note
|
Example:
$ a.out Enter temperature in C = 29 It is 84.2 degrees in Fahrenheit.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started