Pure Programmer
Blue Matrix


Cluster Map

Project: Quadradic Equations

Write a program that computes the value of the [[quadratic equation]] y = ax² + bx + c. Used named constants for a, b and c and use variables for x and y. Initially set a, b and c to 3, 2 and 1 respectively then print out y for x = 0,1,2 and 3. Use the increment operator ++ to change your x variable before each successive computation of y. Then try changing the values of a, b and c to compute different quadratic equation.

Output
$ swiftc QuadraticEquations.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