Pure Programmer
Blue Matrix


Cluster Map

Project: Quadratic Roots (Command Line)

Quadratic equations of the form Ax2 + Bx + C = 0 have two possible solutions given by the [[Quadratic Formula]]. Write a program that prints the two possible roots of a quadratic equation. Then values A, B and C should be passed in on the command line.

See: QuadraticRoots

Output
$ swiftc QuadraticRootsCmdLine.swift -I . -L . -lUtils error: link command failed with exit code 1 (use -v to see invocation) ld: library not found for -lUtils clang: error: linker command failed with exit code 1 (use -v to see invocation) $ swiftc QuadraticRootsCmdLine.swift -I . -L . -lUtils error: link command failed with exit code 1 (use -v to see invocation) ld: library not found for -lUtils clang: error: linker command failed with exit code 1 (use -v to see invocation)

Solution