Simple Math Program VB.NET
Vložit
- čas přidán 26. 07. 2024
- In this VB.NET tutorial we take a look at a simple math program that will add, subtract, multiply, and divide two numbers held in variables.
If you found this video helpful make sure to give it a thumbs up and subscribe to help the channel grow. Make sure to check out our other videos to increase your programming knowledge!
Thanks for the video, this is very helpful for my daughter for flourishing her concepts to make school projects in VB
Glad it helped!
Thanks a lot 🥰🥰
Awesome.
Very clear. Thanks sir
Thanks very much !
Thank you
It would have been nice to see error checking. Such as a character other than a number or if one if the lines is blank
I LOVE YOU
👍
Is your option strict on
Can it work like this?
answer = ( intNum1 +0 ) * ( intNum2 +0 )
That would work although you do not need to add 0 to each number since it would result in the same answer. To answer your question though, yes that would work. When you are coding mathematical equations (or Boolean expressions) the computer will execute what is parentheses first.
not able to multiply with decimals
No worries. Simply change Num1 and Num2 to from Integer to Decimal
Dim Num1 as Decimal
Dim Num2 as Decimal
England you help me
I can't divide
What do you mean? Is your program crashing? Make sure you have textboxes filled in with data before you divide. If they are empty VB does not know how to convert nothing(called a null value) to a numerical representation. If you can give me a little more info I can help you fix the issue you are having. Is the result showing 0 in the textbox?