Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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..





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.