How can the #define statement be used to establish the value of PI in your program? Explain where the #define statement should be located.

What will be an ideal response?

If you place the statement
#define PI 3.14159265
at the top of your *.cpp file (above the main statement), C++ will substitute the 3.14159265 every place it sees PI in the code.

Computer Science & Information Technology

You might also like to view...

________ numbers in the main text of a document are used to reference footnotes and endnotes

Fill in the blank(s) with correct word

Computer Science & Information Technology

The ______ method of the ADT stack adds an item to the top of the stack.

a) createStack b) push c) pop d) peek

Computer Science & Information Technology