Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Microsoft Visual Basic 2010
This is the forum to discuss the Wrox book Beginning Visual Basic 2010 by Thearon Willis, Bryan Newsome; ISBN: 9780470502228
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual Basic 2010 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 26th, 2010, 01:14 PM
Registered User
 
Join Date: Jul 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Math test

Hello Guys,

Now i'm reading this book and i have some questions, beacose this don't work..

Private Sub btnIntMath_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnIntMath.Click
’Declare variable
Dim intNumber As Integer
’Set number, add numbers, and display results
intNumber = 16
intNumber = intNumber + 8
MessageBox.Show("Addition test. " & intNumber.ToString, _
"Integer Math")
’Set number, subtract numbers, and display results
intNumber = 24
intNumber = intNumber — 2
MessageBox.Show("Subtraction test. " & intNumber.ToString, _
"Integer Math")
’Set number, multiply numbers, and display results
intNumber = 6
intNumber = intNumber * 10
MessageBox.Show("Multiplication test. " & intNumber.ToString, _
"Integer Math")
’Set number, divide numbers, and display results
intNumber = 12
intNumber = CType(intNumber / 6, Integer)
MessageBox.Show("Division test. " & intNumber.ToString, _
"Integer Math")
End Sub

I marked where i think it's bad code..beacose it's don't work..Ohh, its working :D i don't know what was with that..

Last edited by Nirankar; July 26th, 2010 at 01:47 PM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with Math.pow trryan5 Java Basics 4 July 27th, 2007 06:12 AM
Math question dparsons ASP.NET 1.0 and 1.1 Professional 5 June 14th, 2006 02:31 PM
Math Namespace transtar C# 3 February 12th, 2006 09:50 AM
math.floor casper BOOK: Beginning Java 2 1 October 29th, 2004 11:24 AM
Math problem... help please! Varg_88 Classic ASP Basics 2 September 30th, 2004 05:17 AM



All times are GMT -4. The time now is 06:42 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.