Right Click Disabled

Wednesday, February 22, 2012

Addition of two numbers get from keyboard in QTP

Option explicit
Dim x, y, z
x=inputbox("Enter First Number :")
y=inputbox("Enter Second Number :")
z=cint(x)+cint(y)
msgbox(z)

Note: In VBScript, Plus(+) operator is overriding operator. It perform addition and concardination. To get addition operation for plus(+) operator, test automaters are using type casting concept.

No comments:

Post a Comment

Twitter Bird Gadget