Programming

Visual Basic (VB) Sum, Difference, Product, Quotient

January 9, 2014

Peekaboo! FIRST POST FOR 2014~! HAHAHA.

Hi guys, I’ll be posting again some of my codes (since last year it was C++, but due to malfunctioned of my other laptop. I was not able to post again.) So, again, this is visual basic.. it has similarities to C++ but not that similar. HAHAHA I hope you get my point. 😛

This program is designed to get the sum, difference, product and quotient of X and Y.

This is my sample form and output of the program. You can also design your own if you want.. :)

This is my sample form and output of the program. You can also design your own if you want.. 🙂

Public Class Form1
    Dim x, y, sum As Integer 
            x = Val(TextBox1.Text)
            y = Val(TextBox2.Text)

           TextBox3.Text = (x + y)
           TextBox4.Text = (x - y)
           TextBox5.Text = (x * y)
           TextBox6.Text = (x / y)
    End Sub

So that’s it! I’m hoping that I can post more soon! :* 🙂
I hope it helps!

til next time.
Tinay 🙂

You Might Also Like...

1 Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.