1.

Write a function using VbScript that allows two values to be passed to it and calculates the average of those two nos. and returns the result. Use the function to calculate average of 3, 5.

Answer»

<script language="VbScript">

function average(a,b)

average=(a+b)/2

end function

a=average(3,5)

document.write("Average is "&a)

</script>



Discussion

No Comment Found

Related InterviewSolutions