Question

Q3] (10 Marks) Convert the following arithmetic formula to visual Basic Language formula: e + sin 30 -b + V6² – 4*a*c log(2)
0 0
Add a comment Improve this question Transcribed image text
Answer #1

To convert the arithmetic formulas and implement them in the Visual Basic Language formulas, we need to use the System.Maths class which contains different mathematical functions such as square root, logarithm (log), trigonometric functions, and other mathematical functions. The following are the Visual Basic language formulae for their corresponding arithmetic formulas:

  • e5 - Math.Exp(5)
  • sin 30 - Math.Sin(30)
  • log(2) - Math.Log(2)
  • tan 35 - Math.Tan(35)
  • For square root - Math.sqrt()

Hence, using the System.Maths class, we can use the above different math functions to convert the required arithmetic formulas into Visual Basic language formulas as given below. Note that simple arithmetic operations such as +, -, *, / remain same in the VIsual basic language too, as in the normal arithmetic formula representation. However, we use the ^ operator which is also known as the exponentiation operator and is used to raise a number to a specific power like 2^2 = 4, 27^1/3 = 3, etc.

Here are your answers for the two part asked in the question:

1: ( ( Math.Exp(5) + Math.Sin(30) ) / ( Math.Log(2) - Math.Tan(35) ) )^1/3

Note that here in this part, we use the ^ operator to cube root (1/3) the whole formula at the end as it is stated and required in the question where the whole term is cube-rooted in the arithmetic formula.

2: ( -b + Math.Sqrt(b^2 - 4*a*c) ) / 2*a

Note that here in this part, we use the Math.Sqrt() to implement square root (1/2) as it is stated and required in the given arithmetic formula. The Math.Sqrt can be hence simply used to square root a number.

Thanks!

Add a comment
Know the answer?
Add Answer to:
Q3] (10 Marks) Convert the following arithmetic formula to visual Basic Language formula: e + sin...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT