Question

public sub lab4() 'define thr main program 'define variables Dim h,b,r,l,w,at, ac, ar, atotal as Double...

public sub lab4()

'define thr main program

'define variables

Dim h,b,r,l,w,at, ac, ar, atotal as Double

h = 10.1

b = 7

r = 2.5

l = 7.1

w = 3.6

Call areatriangle ((h), (b))

Call areacircle ((r))

Call arearectangle ((l, (w))

Call sum ((at), (ac), (ar))

MsgBox atotal

End Sub

Public Sub areatriangle (h,b)

dim a, at as double

a = (b*h)/2 at= a

end sub

Public Sub areacircle(r)

Dim a, ac as double

a = 3.14 * (r^2)

ac = a

end sub

Public Sub arearectangle (l,w)

Dim a, ar as double

a = l*w ar = a

End sub

Public Sub sum(a,b,c)

Dim tot, atotal as double

tot = a+b+c

atotal = tot

end sub

-----------please debug this program------- thanks

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
public sub lab4() 'define thr main program 'define variables Dim h,b,r,l,w,at, ac, ar, atotal as Double...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Assignment Overview In Part 1 of this assignment, you will write a main program and several...

    Assignment Overview In Part 1 of this assignment, you will write a main program and several classes to create and print a small database of baseball player data. The assignment has been split into two parts to encourage you to code your program in an incremental fashion, a technique that will be increasingly important as the semester goes on. Purpose This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of...

  • For this assignment, you will write a program to work with Huffman encoding. Huffman code is...

    For this assignment, you will write a program to work with Huffman encoding. Huffman code is an optimal prefix code, which means no code is the prefix of another code. Most of the code is included. You will need to extend the code to complete three additional methods. In particular, code to actually build the Huffman tree is provided. It uses a data file containing the frequency of occurrence of characters. You will write the following three methods in the...

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