VB School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

 

Code Snippets

  

Visual Basic Source Code


You're Browsing As A Guest! Register Now...
Become a VB Expert!

Join 358,485 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,185 people online right now.Registration is fast and FREE... Join Now!




Pythagoras' Theorem

Finding the hypotenuse.

Submitted By: firebolt
Actions:
Rating:
Views: 896

Language: Visual Basic

Last Modified: April 20, 2009
Instructions: Place in a command button.

Snippet


  1. Dim a As Single
  2. Dim b As Single
  3. Dim c As Single
  4.  
  5. Cls
  6.  
  7. a = InputBox("Enter Side A")
  8. b = InputBox("Enter Side B")
  9.  
  10. c = Sqr(a ^ 2 + b ^ 2)
  11. Print c

Copy & Paste


Comments

There are currently no comments for this snippet. Be the first to comment!

Add comment


You must be registered and logged on to </dream.in.code> to leave comments.





Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month