Ex. 4.3 Use of the math library, conditional statements

Ex. 4.3 Use of the math library, conditional statements

You cannot submit for this problem because the homework's deadline is due.

Description

Write a C function to find the roots of a quadratic equation whose coefficients are input by the user.

Format

Files

GNUMake

If you choose GNUMake, then you should compress assignment.h, ex1.c, ex2.c, ex3.c, main.c, Makefile directly into a zip and submit this zip. (A sample Makefile for hw4 is uploaded on Canvas).

If you just finished ex3 and you immediately want to test whether your ex3 is working correctly. You need to modify your main.c, assignment.h, Makefile (delete ex2.c ex1.c) and then compress main.c,assignment.h,Makefile,ex3.c into a zip and submit this zip.

The sample Makefile on Canvas has -o main, do not change this main!

CMake

If you choose CMake, then you should compress assignment.h, ex1.c, ex2.c, ex3.c, main.c, CMakeLists.txt directly into a zip and submit this zip. (A sample CMakeLists.txt for hw4 is uploaded on Canvas).

If you just finished ex3 and you immediately want to test whether your ex3 is working correctly. You need to modify your main.c, assignment.h, CMakeLists.txt (delete ex2.c ex1.c) and then compress main.c,assignment.h,CMakeLists.txt,ex3.c into a zip and submit this zip.

The sample CMakeLists.txt on Canvas has add_executable(main ..., do not change this main! Also, do not change cmake_minimum_required(VERSION 2.7)

Input

a space separated triple \(a\) \(b\) \(c\), standing for \(ax^2 + bx + c\), on one line

Output

one root per line with a precision of five decimals

Sample 1

Input

1 2 1

Output

-1.00000

Sample 2

Input

1 3 2

Output

-2.00000
-1.00000

Sample 3

Input

1 -2 2

Output

1.00000-1.00000i
1.00000+1.00000i

Homework 4 (Individual)

Not Claimed
Status
Finished
Problems
3
Open Since
2019-10-20 00:00
DDL
2019-10-27 23:59
Extension
72.0 hour(s)