// Code derived from Stroustrup's PPP2 book// § 4.3.1 Constant expressions// -beginning on p 96#include<iostream>usingstd::cout;intmain(){// constexpr double pi = 3.14159;constexprdoublepi=3.14159265359;// using more-accurate def'n instead// pi = 7; // error: assignment to constantconstexprdoubler=2.0;// r = 2.1; // error: assignment to constantdoublec=2*pi*r;// OK: we just read pi; we don’t try to change it herecout<<pi<<'\n'// output above variable values to console...<<r<<'\n'//<<c<<'\n';}