Study to Show Yourself approved unto God...2 Tim 2 vs 15

Monday, 13 June 2011

Adding two numbers without Variables

Adding Two Numbers without Variables



Write a program that asks the user to enter in two numbers and then to add them and show the answer. You are required to draw the IPO as well as the user interface and write the code for this program, not using variables to determine your answer.

IPO Framework


Input
Process
Output
Enter first number (num1)


Enter second number (num2)

Add first number (num1) to the second number (num2)



The sum of both numbers (answers)


User Interface


Coding


Public Class frmaddnums

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        lblans.Text = Val(txtnum1.Text) + Val(txtnum2.Text)
    End Sub

End Class

No comments:

Post a Comment