Pure Programmer
Blue Matrix


Cluster Map

Project: Math Constants

Write a program that prints the values for π, 𝑒 φ (Golden Ratio) and ln 2. Use named constants for all three values.

Output
$ g++ -std=c++17 MathConstants.cpp -o MathConstants -lfmt $ ./MathConstants π: 3.14159 ℯ: 2.71828 φ: 1.61803 ln2: 0.693147

Solution