Hi all..I have two values. a=20 ,b=30
I want to perform c= a+b and c= a*b using user define
function.please anyone give the answer



Hi all..I have two values. a=20 ,b=30 I want to perform c= a+b and c= a*b using user define funct..

Answer / prathyusha

Res=Add (20,30)
msgbox Res
Function Add (a,b)
c=a+b
Add=c
End Function

Res1= Mul (20,30)
msgbox Res1

Function Mul (a,b)
c=a*b
Mul=c
End Function

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

in qtp we ve datatable look like excel ,if we want to extract data from excel which saved in my documet how can i get that in datatable using vb script

2 Answers  


How to get 120 using 5 zeroes, you can use any operator(+, *, /...) in qtp.

2 Answers   Cognizant,


How can I get the value of an object property or variable in another frame?

1 Answers   Citi Bank,


print the array values in ascending order?

2 Answers   CSS Corp,


To get data from table which method will be used in QTP

3 Answers  


Explain about scrrun.dll in vbscript?

0 Answers  


Write a Fucntion to close all Opened browser expect desired one?

2 Answers   Ness Technologies,


Why to add checkpoint in QTP What's the purpose of checkpoints & how to add it

2 Answers  


What is the use of the formatdatetime function in the vbscript language?

0 Answers  


How do you write an SQL insert statement?

4 Answers   HCL,


how does vb script help in web page designing? explain with example.

0 Answers  


What is the difference between for loop and while loop?

0 Answers  


Categories