Pure Programmer
Blue Matrix


Cluster Map

Project: Milky Way Volume Estimate

Estimate the volume of the [[Milky Way]] Galaxy. Assume that the Milky Way Galaxy can be modeled by a disk with radius of 52,850 light-years and thickness of 1,000 light-years. Also assume a central bulge modeled as a sphere of radius 10,000 light-years. The disk should have a 10,000 light-year hole in it so we don't double count the volume included in the sphere.

See [[Cylinder#Right_circular_hollow_cylinder_(cylindrical_shell)|Cylinder Volume]] and [[Sphere#Enclosed_volume|Sphere Volume]]

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