Question: PROGRAMMING ENGINER C++, Please help me to write the code for this problem. Thanks Problem 1. Paste the code provided below into Excel, and expand

PROGRAMMING ENGINER C++, Please help me to write the code for this problem. Thanks

Problem 1. Paste the code provided below into Excel, and expand and enhance the program. Enhance this code by adding at least 8 decimals to the constants. Also, add the other constants shown in the comments sections by expanding the If statement with more ElseIf conditions. Paste your updated code into this document. Do not paste a screenshot.

Function Constant(x)

'this function is for returning values for common constants.

'The inputs are text, the output is a number

'input pi gives output 3.141...,

'input e gives output 2.718...,

'input phi gives output golden ratio 1.618...,

'input gam gives output gamma 0.577...,

'input c gives output the speed of light 2.998 x 10^8,

'input G gives output gravitational constant.

If x = "pi" Then

Constant = 3.141

ElseIf x = "e" Then

Constant = 2.718

Else

Constant = "No constant"

End If

End Function

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!