Pure Programmer
Blue Matrix


Cluster Map

Project: Supermarket Sale (Revisited)

A supermarket is having a sale on 2-liter bottles of soda: buy 2, get one free. A 2-liter bottle of soda is priced at $1.29. Write a program that prints the price for 1 through 12 bottles of soda. Remember to round prices to dollars and cents.

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