Pure Programmer
Blue Matrix


Cluster Map

Project: Sign Function

Write a function that takes an integer and computes the sign of the value. The function should return -1 if the argument is negative, +1 if it is positive and 0 if it is zero.

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