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

We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

0 Answers  


i want to when we will write the scripts either after getting the build or after getting the SRS?

3 Answers  


How to get the length of the string by making use of the string function?

0 Answers  


How can we return a value from User Defined Function ? For Eg. we have 2 functions. In Fun1 i am getting 2 values (a,b) and i am addding those 2 and storing in to another var (c). Now i want to pass that var(c) to another function (fun2). What will be the script?

6 Answers   Nous,


What is the difference between do until loop and do while loop?

0 Answers  






Why to use option explicit in vb script?

0 Answers  


wat is com(common object model)object for mozilla firefox??? if any knows the exact answer....plz rply me

2 Answers  


When are redim statement and preserve keyword used in the vbscript language?

0 Answers  


* ** *** Please write a code to get output like above diagram? ple explain as it how the code works?

2 Answers  


Explain the tristate constants in vbscript?

0 Answers  


Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?

0 Answers  


I have string like hp company.print tis like company hp.write a program in vbscripting

1 Answers   HP,


Categories