Question: Exercise 1: a) Write a C++ program that will: - declare the constant PI=3.14159 using #define syntax; - have a loop that will print 10

 Exercise 1: a) Write a C++ program that will: - declare

Exercise 1: a) Write a C++ program that will: - declare the constant PI=3.14159 using #define syntax; - have a loop that will print 10 values that are: PI, the square of PI, the cube of PI, and so on using the pow() function from . b) Amend the above program to use the const keyword instead of #define syntax. (Note: This is the proper way in modern CH, which has the benefit of type checking, etc.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!