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
  • The questions below deal with Microsoft Visual Studio 2012 Reloaded, under the Visual Basic programming language....

    The questions below deal with Microsoft Visual Studio 2012 Reloaded, under the Visual Basic programming language. The book ISBN number that I am using is: 978-1-285-08416-9 or the UPC code is: 2-901285084168-1. Question 1 Visual Basic 2012 is an object-oriented programming language, which is a language that allows the programmer to use ____________________ to accomplish a program�s goal. Question 2 An application that has a Web user interface and runs on a server is called a(n) ____________________ application. Question 3...

  • Input alphabet {a,b 1. write the CFG for the language of palindromes (5 points) 2. Convert this i...

    Input alphabet {a,b 1. write the CFG for the language of palindromes (5 points) 2. Convert this into PDA (state the accepting condition) (10 points) . Write a PDA for this language that satisfies the conditions required to convert it into CFG (5 points) 4. Convert the PDA from Q3 into CFG (10 points) Input alphabet {a,b 1. write the CFG for the language of palindromes (5 points) 2. Convert this into PDA (state the accepting condition) (10 points) ....

  • #4: Complete the following: a) Convert to phasor form: A = 10 cos (s. 10 +...

    #4: Complete the following: a) Convert to phasor form: A = 10 cos (s. 10 + /4) b) Convert to phasor form: B(1,1) = 32 sin (8710'+2.r --30°) ay c) Convert the phasor A. = 35337/4 to the exact time domain form A () = A, sin (wt + o), with w = 2 10% rad/sec. Since it is not defined, you must use the baseline assumption, A, = Re 4 d) Convert from phasor to a single cosine or...

  • Question 16 (1 point) Use the integration formula below to find 83 '1+sin (4) -dt. -...

    Question 16 (1 point) Use the integration formula below to find 83 '1+sin (4) -dt. - du = tan u F sec u + C | 1 + sin u O a) 2 tan (rº) – 2 sec(fº)+c Ob) 2 tan (rº) + 2 sec($)+c O c) 2 tan (72) – 2sec (tº)+c d) Stan () +8 sec (+4)+c e) 2 tan (**)+2 sec(74)+C

  • computer Programming visual Basic 1-10 QUESTION 1 Which of the following is not a logical operator...

    computer Programming visual Basic 1-10 QUESTION 1 Which of the following is not a logical operator in Visual Basic? Not • or And Then QUESTION 2 Which of the following is a valid Visual Basic conditional statement? 2<n<5 2 <n or <5 0 2 <n<5 (2 <n) or (n <5) QUESTION 3 When Visual Basic stops evaluating a compound condition with the logical And operator because the first condition evaluates to False. It is called evaluation. short-circuit Pre- compound first...

  • #49,53,57 3- lar coordinates to polar coordinates will Polar Coordinates Convert blar coordinates with r> 0...

    #49,53,57 3- lar coordinates to polar coordinates will Polar Coordinates Convert blar coordinates with r> 0 and the ove describe of the the rectangular con 050<27. 37. (-1,1) be app 39. (V8, V8) 41. (3.4) 38. (3V3,-3) 40. (-V6, -V2) 42. (1,-2) 44. (0, -V3) your a (a) Yo (b) YO 43. (-6,0) Rectangular Equations to Polar Equations Convert the equation to polar form. 45. x = y *.47. y = x² 49. x = 4 46. x² + y2...

  • (a) Evaluate the double integral 4. (sin cos y) dy dr. Hint: You may need the formula for integration by parts (b) Show...

    (a) Evaluate the double integral 4. (sin cos y) dy dr. Hint: You may need the formula for integration by parts (b) Show that 4r+6ry>0 for all (r,y) ER-(x,y): 1S2,-2Sysi) Use a double integral to compute the volume of the solid that lies under the graph of the function 4+6ry and above the rectangle R in the ry-plane. e) Consider the integral tan(r) log a dyd. (i) Make a neat, labelled sketch of the region R in the ry-plane over...

  • (a) Convert 10100011 from binary to decimal (b) Convert (5789) 10 to Octal (c) Convert (2576),...

    (a) Convert 10100011 from binary to decimal (b) Convert (5789) 10 to Octal (c) Convert (2576), to binary (d) Convert (ABDF).. to decimal (e) Convert (241823), to Hexadecimal Q2. (a) Subtract 1100110 from 0110001 using 2's complement (CLO 1: 2 MARKS) (b) Add 79 and (-98) using 10's complement (CLO 1: 2 MARKS) Q 3. Derive the Boolean expression for the logic circuit shown below: (CLO 1: 3 MARKS) A Q 4. Simplify the given Boolean expression using Boolean laws...

  • 10. Rewrite the following expressions with exponents no greater than 1: A. sin? 2 B. cost...

    10. Rewrite the following expressions with exponents no greater than 1: A. sin? 2 B. cost 11. Let cos(20) 3 4 Find tan’ a sin 12. Graph two periods of the trigonometric functions: A. f(0) = 3 tan (20 – 5). B. g(x) = – cot(.x+7) C. f(x) = 2 sec(47x) + 3 D. g(0) = 5 csc -7 13. Identify the visible asymptotes for each of the graphs in question 12. 14. Write a formula to find ALL asymptotes...

  • System Number Basic Tier Subscribers Basic Tier Price Per Capita Income Pay Tier Price Q3 (10...

    System Number Basic Tier Subscribers Basic Tier Price Per Capita Income Pay Tier Price Q3 (10 points) 1 3300 18 3900 22 A. Estimate a basic cable demand using a simple regression model, Q=a+bP+e. 2 6600 10 5560 10 B. Estimate a basic cable demand using a multiple regression model, Q=a+b*PRICE+c*INCOME+d*PayTierPRICE+e. 3 3900 18 8900 18 4 5000 14 8200 16 5 5100 15 7950 10 6 6900 9 6500 7 7 6400 12 5900 8 8 5900 13 7500...

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