Having troubles

vbnetrook

New member
Joined
Sep 30, 2005
Messages
2
Programming Experience
Beginner
I am new to vb and I am not able to figure out how to do this problem... It reads as followed...

Write a program that requests the user to select one of the shapes, requests the appropriate lenths and then gives the area of the figure. The areas should be computed by Function procedures.

Shapes: Circle (3.141593*r^2), Parallelogram (l*h) and a Kite (l*w) / 2


If anyone can help please let me know how to do this problem.
 
luckily for you these are easy, here's how the function for the circle would be done:
VB.NET:
Private Function CircleArea(Byval Radius As Single) As Single
  Return (3.14593 * Radius) ^ 2
End Function

just do the other functions similar to this one and you're set
also note for these functions you'll want to use the Single and Double variable types, in my function i've used the Single variable type
 
As I have alluded to in your other thread, this sounds suspiciously like homework. If this is the case then I suggest that you make a start on the code and ask specific questions about issues that arise on the way. Those are extremely simple functions so even a complete newbie should be able to work out how to code them with a little thought. If you can't them I'm afraid you need to go back and read your notes rather than asking others to do your work for you. If you continue doing what you are then you'll learn very little and have to keep coming back every time the circumstances change just a little. You learn much more by doing and it will make it easier to do more complex things in future.
 
I also couldn't resist putting my own note about John's advice if I may say so ... i replied to the other thread as well
So, the matter of fact is that we can help you in a second (as John pointed out) but not that only you'd would learn nothing but much worse, you’d lose and that what u have learned so far relying to our help each time you need that.

Regards ;)
 
Back
Top