hi,
i was adding the two numbers in qtp scripts but i didn't get
the answer. see my below script, i dont know wht is the problem.

i passed the value a=3 b= 2, i got the ans 32 instead of 5.
i thing the problem is to be c = a+b

my mail id karthis4u@gmail.com

Dim a, b, c
a = inputbox("enter the a ")
b = inputbox("enter the b ")
c = a + b
print c

Answer Posted / qa

hi

Use CINT Function:: correct code is

Dim a, b, c
a =cint( inputbox("enter the a "))
b =cint( inputbox("enter the b "))
c = a + b
msgbox c

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can launch two instances of qtp on the same machine?

576


When I click on a link in web page.Link should open in new window.can anyone please let me know the script for this ---Koti

2487


Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B

2908


How do we handle run-time errors?

575


how can we preform retesting(DATA driven test) using function please gine the code for loginpage

2268






How will you handle java tree in qtp?

621


what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

1705


Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?

1466


If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?

580


How to interact tool & application build in QTP?

1459


Explain about business process component? types and usage?

1559


Differences between quicktest professional (qtp) and winrunner?

617


Is qtp supports uni-code?

609


How to capture all the data of a webtable, weblist and combolist using QTP?

2849


What is Associate Repository in QTP 9.2 ?

595