Question: C programing Problem 2 : ( 1 0 pts ) Write a function named numRoots that accepts three values ( a , b , c

C programing
Problem 2: (10 pts)
Write a function named "numRoots" that accepts three values (a, b, c) of type double as parameters and returns an integer value. (Only a function, no main program) The function should evaluate the term (b2-4ac) and return an integer as follows:
If (b2-4ac) is positive then return 2.
If (b2-4ac) is zero then return 1.
If (b2-4ac) is negative then return 0.
C programing Problem 2 : ( 1 0 pts ) Write a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!