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

Which in-built function is used to format the number in the vbscript language?

0 Answers  


Can any one provide code for Mid(string,start[,length]). I have been asked to write code for Mid(). i.e We need to define our own function say MyMid() which should behave same like built-in Mid function

0 Answers   Microsoft,


Whenever I use Wscript.Echo Qtp raising Run time error as 'Object required for Wscript' How I can create object for Wscript

1 Answers  


1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?

0 Answers  


which is the best institute in banglaore for software testing?

1 Answers  






How will you format a number in percetage format in vbscript?

0 Answers  


How to find a latest file from any folder

3 Answers   Ness Technologies,


What are the 2 ways in which a variable can be declared in the vbscript language?

0 Answers  


what is descriptive programming in QTP and what is environment variable in QTP? where we store and what is its use?

4 Answers   Perot Systems,


Can anyone send me a vb script function for verifying the functionality of active links on a web page

0 Answers   Zensar,


What is the difference between Javascript & Vbscript?

2 Answers  


How to replace junk code recorded by QTP with a mall function.

0 Answers  


Categories