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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

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

544


hi all, i had a question, that how to find out hiding a coloumn in a table i had a table having the following column names NAME DESCRIPTION CREATED TIME CREATED USER if i right clicked on a NAME column it will displays a menu having the same column names in a list like NAME DESCRIPTION CREATED TIME CREATED USER with check boxes.if i unched any check box, that column name should not be appear in the main table column names could anyone please solve this problem?

1540


Which keyword is used to declare a variable in the vbscript language?

519


Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)

3171


What is byref and byval parameters in vbscript?

594






What are subprocedures in vbscript?

647


who will create the object?

1707


Mention the rules for using option explicit statement?

469


If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?

1541


Explain about constants in vb script?

563


I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?

852


wht must be the interview question on corinthian information technology solutions incorporated.

2173


How to pass argument by reference to a function in vbscript?

524


hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz

2569


How do i automate a website www.flyashx.com without having any test cases witin a week time.

1441