Value of pi code example Example 1: pi value 3.141592653589793238... Example 2: value of pi approximately 3.14